Closed OmarHawk closed 10 years ago
Tested in Chrome and Firefox (the most recent stable versions of both)
Sorry for offtop, but what tool did you use to create this amazing gif ?
You didn't set that the tag is a block-like tag. Because of that the BBCode parser is failing to do it right.
http://jsfiddle.net/kpzfh7L2/2/
http://www.sceditor.com/documentation/custom-bbcodes/
<h4>
is a block element and you told it it is an inline element.
On a different note. Please also test that on the latest dev version. I think there are a bug that looks like that that has been fixed.
Ok, I tested it with your option adjustment and with the latest dev version: http://jsfiddle.net/kpzfh7L2/6/
Problem now is, that when toggling the very first time to source mode, two extra newlines are created: One before the block level element and one after the block level element:
Which browser(s)?
I've tested Firefox 32.0.3 and Google Chrome 38.0.2125.101.
@OmarHawk I just checked. That's not a bug. That's by design. I suppose that the design is wrong, then...
Please make an issue requesting for this to change. There needs to be a good amount of discussion on how to deal with block elements and new lines when translating to BBCode...
See if you can manipulate the gif so that you show how it is now and how it should be to make it easier for us.
Well, since we have #351 now, this can be closed.
Recently, I tried adding a new bbcode to my editor for headlines using the h4 html tags as representation when I'm in wysiwyg mode. Unfortunately, when the user toggles between source mode and wysiwyg mode, further newlines are added, and I have no idea, where they come from. Here is how that looks like (the youtube button is the headline button here, because I have not added extra css, so don't wonder :P):
Here the jsfiddle for that example for you to reproduce: http://jsfiddle.net/kpzfh7L2/. Is the bug on my side or in the editor code?