Hi,
Recently, I realize there is some inconsistent behavior for "Bold" toolbar button.
I have the following text, which "abc" and "hij" is being bolded.
Suppose I select the follwoing "bold text + non-bold text" mixed, I will get the following outcome. Bold button will be turned on.
However, if I select "non-bold text" + "bold text" (non-bold text comes first), bold button will not be turned on.
I was wondering, is this the correct behavior?
p/s May I know where is the code for handling bold toolbar button state? I look at https://github.com/ckeditor/ckeditor-dev/blob/master/plugins/basicstyles/plugin.js but cannot find it.
Seems reasonably logical
If the first character of the selection is bold, bold indicator is on. Pressing B unbolds the bold section of the selection
If the first character is not bold, bold indicator is off. Pressing B makes the whole selection bold.
Difficult to see how else it could work where there is a mixture.
What is not logical, IMHO, is HTML5's daft ruling that B buttons may no longer insert <B> tags, thus interface coders have to find some workaround like using <strong> instead. But then, that is what you get when design is by a committee. :-/