-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Source editing doesn't save unless going back to WYSIWYG #11008
Comments
For anyone struggling with this issue - if you need to sync data on some trigger (e.g. button click), you can use |
In general, every approach that retrieves data from the editor on a frequent action (like Therefore, a much better solution is indeed triggering data retrieval/save on some reasonable trigger like "save" button click or a debounced autosave callback. So, @Dumluregn's response makes a lot of sense actually. It also makes a lot of sense that the editor data is not automatically updated by the source mode. It may simply cause a lot of issues with some partially incomplete HTML being forced into the editor's data pipeline, causing weird effects in there. The only issue here, IMO, is that |
@Reinmar do we treat a change in a private method as a breaking change? Possible solution that could benefit from TS:
But we are not sure if internal API is a part of breaking changes. Minor breaking change? |
Decision: we don't treat private API as a breaking change. |
…-source-mode Feature (source-editing): Make `SourceEditing.updateEditorData` method public to allow saving source editing data independently of the UI. Closes #11008.
How can you do this with angular and ckeditor custom build ("@ckeditor/ckeditor5-source-editing": "^38.0.1"). I got error Uncaught ReferenceError: editor is not defined |
@Witoso I still have a problem. When I'm in SourceEditing mode, ngModel should be updated with click on button UPDATE SOURCE, but it isn't (Browser freeze) Here is the link to the code: https://github.com/aljaznuncic/testCkeditor |
@aljaznuncic looks like a known problem in Angular integration (ckeditor/ckeditor5-angular#360), let's move the discussion there. |
I'm having the same issue using https://github.com/ckeditor/strapi-plugin-ckeditor where any changes on source editor doesn't trigger the update and the changes aren't saved. |
@aljaznuncic |
@aimeos you posted the same comment to 3 issues. In the future, please create a new one.
No plans for now as source editing is not directly editor instance. Create a ticket and we store this improvement. |
@Witoso A new Github issue or somewhere else? |
Maybe this is rather a question than a bug but I couldn't find a bettter place to submit it.
We're using CKeditor to edit the (mardown) contents of a textarea. Unfortuantely, the textarea isn't part of a submittable form and its contents (among others) are sent to a server after manually saving (and thereby closing the editing area). That's why I use a simple
to ensure that the textarea always contains the user input of the WYSIWYG editor which works fine, except for input made from within the source editor. There, the
change:data
event never fires and subsequently, nothing is changed.For CKEditor 4 I found this. Is there something similar for CKEditor 5? What am I missing?
📝 Provide detailed reproduction steps (if any)
change:data
event) and see that nothing happens✔️ Expected result
Changing something while in source editing should also trigger the
❌ Actual result
Only after going back to the WYSIWYG mode, the changes are applied (i.e., the
change:data
event is fired).📃 Other details
If you'd like to see this fixed sooner, add a 👍 reaction to this post.
The text was updated successfully, but these errors were encountered: