• Before posting a question, please check our Frequently Asked Questions page as well as previous threads here. Odds are you aren't the first to ask, and you may find the answer without having to post!

Answered Repeating Code?

AlbaGuBrath

"Scotland Forever"
I've just started dabbling in making BBCode so, naturally, I do a lot of saving posts, making small tweaks to them, then looking at the results to figure out what to do next. However, I've recently started noticing an issue where I'll come back to a post and the code will have random snippets repeating where they don't belong. (For example, color tags around an image.) So far, they haven't broken my code, but I makes it look messy and harder to find which part of the code I want to access.

I've been told to use the code editor option instead of the Rich Text one, which I'm doing, but I still run into this problem sometimes. I think it's because when I first open a post, it goes straight to the Rich Text editor before I change it to the other. I feel like at one point there was an option to make the code editor the default, but I haven't found the place to do that yet, if there is one. Could someone point me in that direction, please?

Also, is there a particular reason that happens at all? Besides using the coding editor, are there any other ways to keep this from happening or fixing it once it does?
 
Also, is there a particular reason that happens at all? Besides using the coding editor, are there any other ways to keep this from happening or fixing it once it does?

Do not code directly from the site's editor. Save all of your raw coding in a word processor, like Microsoft Word, or Google Docs, then copy and paste from there. Even though the RTE is disabled, it's really the site's editor that's getting to your coding. Never trust it.
 
If you go the Preferences, under Options there is a check-box that you can uncheck to not have Rich Text Editor as the default. As for why the codes repeat when you start out with Rich Text then move to Code Editor I have no idea but it bothers me as well.
 
Do not code directly from the site's editor. Save all of your raw coding in a word processor, like Microsoft Word, or Google Docs, then copy and paste from there. Even though the RTE is disabled, it's really the site's editor that's getting to your coding. Never trust it.
Okay, good to know... Why does that happen? Is it a bug, or just part of the system for some reason?

If you go the Preferences, under Options there is a check-box that you can uncheck to not have Rich Text Editor as the default. As for why the codes repeat when you start out with Rich Text then move to Code Editor I have no idea but it bothers me as well.
Ahh, I found it! Thanks!
 
This thing happens when you either:

For example, you do a <bg>, <border> <color> and <font> tag. However, as you finish editing the post, you did not close the <color> tag with </color>.

So, in order for it to work appropriately, the editor tries to close the tag, causing a number of <color></color> codes pop up everywhere, since it is closing every instance of opened <color> tag. Even though you only did one, it will multiply in number to provide unclosed tags.
In coding, proper arrangement is necessary. If you misplace a single code, everything will be a mess.

For example, you start with a <bg>, then a <border> then <color> and finally, <font>. However, when you did the closing tags, you did it in the order of </color>, </font>, </border> and then </bg>.

The editor, then, will try to fix it up by placing a closing tag in the appropriate location, which should be after the font. In which case, it will also place opening tags to fix the closing tags without open ones. This causes a number of similar, repetitive codes that should have not existed to appear.

So, before you click post, or click finish editing, make sure that you have checked and re-checked the entirety of your coding, else you'll get this occurrence again and again.
 

Users who are viewing this thread

Back
Top