feat: inline editor#606
feat: inline editor#606vinitkumar merged 90 commits intodjango-cms:masterfrom fsbraun:feature/inline-editor
Conversation
Fix: Admin forms w/o plugin
vxsx
left a comment
There was a problem hiding this comment.
thanks for the pull request, the feature looks very nice. still need to actually test it, but added some comments from what i could see so far
|
@vxsx Thanks very much for the comments! They make a lot of sense to me! I appreciate it! Let me know what you think when trying out! I'll have a thought about auto save but my initial reaction is that it will be a must. You always can revert to the published version. |
|
@vxsx Vadim, I've made some changes. Thanks once more for the helpful comments
|
|
i also encountered this when testing locally https://www.dropbox.com/s/nk7ykacpvaa2qqe/something%20weird.mov?dl=0 however afterwards it worked correctly, not quite sure what was up first text plugin was created without inline editing mode, afterwards i've enabled the setting and refreshed |
|
otherwise looks good to me |
|
The newline gives me a headache: I cannot stop pycharm adding one automatically. Apparently github editor does the same. Tried emacs, no success, alas. Finally did install Will fix the bug for inline. It is actually was supposed to solve a bug leading to |
|
Also, the bug you've recorded @vxsx seems to be a "follow-up" effect of the displayStyle bug and should be fixed now. Let me know if not! I've managed to remove the new lines at the end of Have a great vacation! |
Quick explanation: CKeditor inserts its css into the head of the page. When the toolbar is reloaded the css is removed. Therefore I keep a copy of the css and replace it after reload. If the spawning of the editor fails before it is finished (e.g. due to the displayStyle bug) the css is not saved and the editor toolbar just contains the names of the toolbar items like in the screen recording.
Creation (or copying) of text plugins is only possible through the structure boards "+" button. |
| that.editor.insertHtml(res, 'unfiltered_html'); | ||
| that.editor.fire('updateSnapshot'); | ||
| CMS.CKEditor.editors[editor.id].changed = true; | ||
| CMS.CKEditor.editors[editor.id].child_changed = true; |
There was a problem hiding this comment.
seems like some sort of tabs vs spaces issue
|
@vxsx Thanks so much! 🚀 |
New feature: Inline editing
Especially for small changes but also for all layouts that consist of more than one Text plugin the edit cycle is simplified: If activated the modal for the change form of a Text plugin does not have to be opened.
Activate by having
TEXT_INLINE_EDITING = Truein yoursettings.py.Drawbacks
divto allow inline editing. This can break some custom styles. Use "View published" or switch inline editing off using the toggle button with the pencil<script>tag generated by Dajngo'sjson_scripttemplate tag - also ifTEXT_INLINE_EDITINGis not set toTrue.Bugs fixed
cms/plugins/text.htmlfile. Price is a newcms/plugins/inline.htmltemplate.Know bugs (to be fixed)
Please add comments to this PR if you find any!