(Note: tagging @julian since he seems to be the keeper of the Redactor GitHub.)
We recently upgraded from an older version of NodeBB to 1.6.1. Everything is working well, except that the Redactor editor has become really funky as a result. (Previously it worked quite well for us.)
BUG 1: There seems be confusion about about the difference between the start of a line and the end of a line when making selections.
[EDIT: NEW REPRO]
In a new post do the following:
- Type "This is the first line"
- Insert a picture
- Type "This is the second line"
- Select "This is the select line", dragging from the "T" and continuing on to the "." after the word "line"
- Press the delete key.
- Text and the picture are deleted.
If I undo that operation, I see this:
showing that it somehow believed that the picture and the text were selected before the delete.
This is by far the most annoying of the three bugs I'm listing here.
BUG 2: Likewise, if I select Line 2 and Line 3 as shown below – dragging from the 'L' of Line 1, and ending with the '3' of Line 3 – you see this:
which is correct. But if I think choose the "1.2.3." button to number it, I get this.
Which is not correct, since I did not select Line 1 at all.
So, it would seem that a selection at the start of a line is interpreted as being at the end of the previous line.
BUG 3: On a fresh line, click the "I" button for Italics. Type some text. Now click the "I" button again to go back to normal text. Type another key. All good.
But, then try the following: Command (Control) I to turn Italics on – "I" button switches to "I" state. Type some text. Command (Control) I to turn Italics off. Button switches to "off" state. Type another character. Italics are turned back on!
Interestingly, the "B" for Bold key does not have this bug.
It would be great to get these things fixed. My users are not the types that would enjoy the normal composer. We really need a solid WYT (Type) IWYG editor.
If others using Node BB 1.6.1 and Redactor 3.0.3 are not seeing the same problems (i.e., it's somehow isolated to us) then please let me know here.