[Rejected] Sceditor WYSIWYG - Size tag around lists.
#1
So basically, I go to the editor source mode and type:
[size=large][list=1]
[*]aaa
[*]bbb
[/list][/size]

When I switch to WYSIWYG, the size tag is removed.

Moreover, if I use the size tag around the list when in WYSIWYG mode, this will happen:
  1. aaa
  2. bbb
The size is around each list element and does not cover the list numbers...

Finally, if I try this in source mode:
[list=1][size=large]
[*]aaa
[*]bbb[/size]
[/list]
The list numbers to get same font size, but after switching back to wysiwyg mode it is lost again.
Reply
#2
It's correct HTML-wise - inline <span> shouldn't be a parent of a block element - <ul> or <ol>. Despite that, MyBB parser doesn't disallow it - if anything, this is missing detection of bad code which breaks HTML validation. The only problem I can see in SCEditor is that you can't change the sizing of the list item indicators at all - the correct way would be a possibility to add font-size CSS to ul/ol elements.

Once again, this is a SCEditor problem which is present also here http://www.sceditor.com/ and I don't think we should touch it.
Reply
#3
(2015-09-27, 11:14 PM)Destroy666 Wrote: Once again, this is a SCEditor problem which is present also here http://www.sceditor.com/ and I don't think we should touch it.

Should I contact the sceditor developer instead? I would like to contact who exactly is working on the sceditor, plus its integration into MyBB if possible.
Reply
#4
(2015-09-27, 11:37 PM)MangaD Wrote:
(2015-09-27, 11:14 PM)Destroy666 Wrote: Once again, this is a SCEditor problem which is present also here http://www.sceditor.com/ and I don't think we should touch it.

Should I contact the sceditor developer instead? I would like to contact who exactly is working on the sceditor, plus its integration into MyBB if possible.

Feel free to: https://github.com/samclarke/SCEditor Keep in mind that some bugs you reported here were already reported there months ago: https://github.com/samclarke/SCEditor/issues/356
Reply
#5
Sam Wrote:This is because the BBCode results in invalid HTML It can be parsed by disabling the fixInvalidNesting parser option but it’ll still get stripped when the HTML nesting is fixed. Currently there isn’t an option to disable the HTML fix but I can add one if you want.
Or you can patch the fixNesting method to be a noop which combined with disabling the fixInvalidNesting option will allow inline elements to contain blocks:

$.sceditor.dom.fixNesting = function() { /* noop */ };
$('textarea').sceditor({
// options
parserOptions: {
fixInvalidNesting: false
}
});

Can somebody take a look at the proposed fix from Sam to see whether this results in the expected behavior?
Support PMs will be ignored!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)