Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I committed #1425894: CKEditor support but noted that it only supported CKEditor v3 and not v4. It looks like from #153313: ckeditor input is lost when using the browser's back button that CKEditor 4 might support a different event for changing field values.
Comment | File | Size | Author |
---|---|---|---|
#11 | ckeditor_v4_support-1965880-9.patch | 1 KB | Adrian Richardson |
Comments
Comment #1
Yurii CreditAttribution: Yurii commentedHi,
I was looking for autosave support with CKeditor v4 and i end up with this solution for now.
Maybe it will help, its same solution like for Tinymce editor.
My addition in autosave.js:
Code have to be past directly after the Tinymce code
Comment #2
IRuslan CreditAttribution: IRuslan commentedProvided code is works.
But we should either use that snippet either default for 3 version.
It would be great to have common solution.
Comment #3
heyehren CreditAttribution: heyehren commentedFor anybody else who has problems getting this working, i had to place the above patch before the following line in the autosave.js file
Comment #4
shortspoken CreditAttribution: shortspoken commentedWorks like a charme! Thanks a lot!
Cheers, Moritz
Comment #5
ranelpadon CreditAttribution: ranelpadon commentedThere's also a related AutoSave CKEDitor plugin that leverages the HTML 5 LocalStorage object.
http://ckeditor.com/addon/autosave
Comment #6
Nux CreditAttribution: Nux commentedFor anyone else trying to figure this out - you need to:
It took me awhile to understand that editing config.js doesn't really do much.
Comment #7
Axl CreditAttribution: Axl commented@IRuslan: the common solution would be to simply wrap a
if (CKEDITOR.version.split('.')[0] <= 3 )
around the <3 and 4+ branches.
Edit: ah, I got it now. it works for v3, too :)
Edit2: actually I used
instance.editor.updateElement();
- somehow that worked better with slow connections on v3.Comment #8
aether CreditAttribution: aether commented#1 is working for me.
Comment #9
Adrian Richardson CreditAttribution: Adrian Richardson commentedI've tried Yurii's solution in #1 and it's working for me for both CKEditor v3 and v4.
Patch attached for review.
Comment #10
Dave Reid@Adrian: That is a patch against scald_og, not autosave.
Comment #11
Adrian Richardson CreditAttribution: Adrian Richardson commentedOops, I grabbed the wrong file! Sorry about that.
This is what I meant to load :-)
Comment #12
czigor CreditAttribution: czigor commentedPatch in #11 works for me on CKEditor 4.2.3 with Wysiwyg module.
Comment #13
fabsor CreditAttribution: fabsor commentedThis solution seems to work fine!
Comment #15
czigor CreditAttribution: czigor commentedCommited, thanks!