Most of the apps today use WYSIWYG editors to manage editable content/text and we have some highly customizable options available such as TinyMCE(http://tinymce.com) or CKEditor(http://ckeditor.com).
Another great option is Redactor(http://imperavi.com/redactor/) if you want minimalistic UI with extremely simple API. It is simple to implement and comes readily compatible with jQuery. So all you have to do is make a simple call as :
I have been using this great plugin for the past few months and i did not have any issues whatsoever. In fact i loved it’s autosave feature making it simple to save content at a regular interval or on content change.<\p>
But just a couple days ago i noticed an issue with autosave where it won’t autosave when we remove all the content. To resolve this i looked into the redactor.js file and found that it had a condition put in place which was something like this :
if (this.utils.isEmpty(html)) return;
So whenever it found the content area as empty it would just return instead of running ajax calls. So all i had to do was to comment out this line of code and it started saving empty values.
Now, it might have been updated in the 10.x so please update your plugin if you want to avoid this temporary fix.
Latest posts by alexey (see all)
- “Could not open input file” on running migrations in yii2 - October 27, 2017
- Fixing a WordPress pagination 404 error - June 1, 2017
- Making Yii 2 Client side validation work - April 22, 2017