Implemented Redactor Jquery editor instead of Tinymce

This suggestion has been implemented. Votes are no longer accepted.
Could a js developer confirms that the execCommand undo/redo is bloody buggy? :mad:
I don't understand why it's working with bold/italic/underline (with a small & curious undo/redo memory) but with some other commands (I'm playing with the font size) it doesn't ; unless to use the keyboard shortcuts (may be thanks to the browser) and this, for one time only. I'm going to finish to convert buttons, but there's may be a reason why TinyMCE and CKeditor main file size is bigger. At least, it works with them. I'm not sure I will use Redactor after all.
 
Version 0.06 released
  • Font Size/Font Family buttons added

demo.webp

Still need to see if the way Redactor insert nodes can be modified to avoid nested span tags... :cry:
Honestly Redactor is promising but I'm not sure it should be integrated to XenForo...
 

Attachments

  • demo2.webp
    demo2.webp
    8.9 KB · Views: 13
Could a js developer confirms that the execCommand undo/redo is bloody buggy? :mad:
I don't understand why it's working with bold/italic/underline (with a small & curious undo/redo memory) but with some other commands (I'm playing with the font size) it doesn't ; unless to use the keyboard shortcuts (may be thanks to the browser) and this, for one time only. I'm going to finish to convert buttons, but there's may be a reason why TinyMCE and CKeditor main file size is bigger. At least, it works with them. I'm not sure I will use Redactor after all.
A self reply. So Redactor doesn't have a customized undo/redo stack function. It only uses the default execCommand undo/redo. This works nice when the text is in bold, italic, etc. But if the "font" tag is changed to a span tag with a css property (needed for the XenForo parser) or even when Redactor itself inserts a color converting this font tag to a span tag with the jQuery replaceWith command (you can test it yourself here), the execCommand doesn't register this step anymore (which is logical since it's not one of its operations). Redactor has an api function called setBuffer() but it only saves the content of the editor which seems to cancel the undo/redo memory of the execCommand operations. In other words, in this case the undo/redo function will only work on time.

Conclusion: Redactor needs to implement its own undo/redo stack. There are some plugins for that, but this should be in the core like with other major editors.
 
Hope we can use it soon under XF. *looking at cclaerhout* :whistle:
And I'm looking at Mike :whistle::p
I had fun with Redactor ; I was just curious to see the differences between a Jquery RTE editor and a BbCode editor (MarkItUp). Well I saw... and I confirm that a RTE editor is another world... especially when all must be coded. I hope one day Redactor will compete with CK editor and TinyMCE (I've bought a license... so it better will), but it still needs to be improved.
 
I'm sure you will take a look. You will take a look. You will take a look for sure. :sneaky:

About Redactor, it was looking promising, but somehow, after reading their last bloc entry, what Redactor offers and looking at Tinymce 4 ; I feel like it's no more worth anymore.
 
TinyMCE 4 not only looks good, but is also well coded.

Old version used tables for buttons, making it impossible to apply responsive design to it. With version 4 it should be doable.
 
TinyMCE 4 not only looks good, but is also well coded.

Old version used tables for buttons, making it impossible to apply responsive design to it. With version 4 it should be doable.
But it seems it still uses an iframe for the editor content. Isn't it a problem for responsive design?
 
But it seems it still uses an iframe for the editor content. Isn't it a problem for responsive design?
Its JavaScript generated iframe with width set to 100% of its container, so its not a problem.

Change width of container element in their example, whole editor will automatically adjust.
 
Back to redactor, I've been talking with one of the developer, Art, and it confirms the redo/undo functions of the current version is "pretty ugly". He's working on it for the next version (Redactor 9). At least, he's very frank and replies to mail very quickly. I've released the version 0.0.7 of the integration: no new buttons, but a major rewrite of the Javascript files and of the framework, and a new function as well to manage nodes & selection after using execcommand (see here).

I've also made a demo of this integration here. I'm sorry but you will need to register to test it. If you want me to delete your account after, just tell me. No need to tell me "this doesn't work, that neither...". I already know it, it's just a demo for fun.
 
Top Bottom