Closed (fixed)
Project:
Autosave
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
2 Feb 2012 at 13:02 UTC
Updated:
23 Apr 2013 at 20:10 UTC
Jump to comment: Most recent file
Added CKEditor support in autosave.js file, tested and it worked fine for me. Maybe someone else will find it useful.
| Comment | File | Size | Author |
|---|---|---|---|
| #18 | autosave-ckeditor_support-1894354-17.patch | 639 bytes | freblasty |
| #15 | autosave_ckeditor-1894354-2.patch | 704 bytes | pjcdawkins |
| #11 | wysiwyg_ckeditor-1425894-11.patch | 1.39 KB | deciphered |
| #7 | autosave_ckeditor.patch | 786 bytes | eugene.ilyin |
| autosave-ckeditor.patch | 807 bytes | maris.abols |
Comments
Comment #1
cbAwesome, thank you.
Comment #2
jthinaka commentedIt didn't work for me as it said that Drupal.settings.wysiwyg.triggers doesn't exist. Any ideas?
Comment #3
cedeweyComment #4
nmosesgo commentedNot certain how to properly apply this patch. I'm in the autosave.js file. Do i simply replace the tinymce portion, or do I append it to the end? I tried replacing the tinymce section, and it doesn't work for me.
Here's how my code looks.
Thanks!
Comment #5
nikita petrov commentedI'm appended block with "if (typeof(CKEDITOR) !== "undefined") {}" after section with " if (typeof(tinymce) !== 'undefined') {}" and all works fine for me. Thanks!
Comment #6
haydeniv commented@jthinaka If you are like me and not using the WYSIWYG API and just have CKEditor module installed directly the patch will not work instead you need to use this for the patch:
Comment #7
eugene.ilyin commentedLittle fix in your patch to avoid js errors with undefined keys.
Comment #8
Patribus commentedHello. Is there a similar patch for TinyMCE?
Thanks
Pat
Comment #9
haydeniv commented@osmanedosbatuque you should probably open a separate issue as this issue deals specifically with CKEditor.
Comment #10
Patribus commentedok, sorry, i just thought, the approach would be similar...
thnaks , cheers
Comment #11
decipheredSo the patch at #7 doesn't apply, but then there's also the issue of how it uses CKEDITOR, as it appears that it's for CKEDITOR's native module not for CKEDITOR via Wysiwyg.
I don't want to get into that argument, I'll leave that for someone else, but my client needs support for CKEDITOR via Wysiwyg, so find patch attached.
Comment #12
haydeniv commentedI would think that there should be some way we could detect whether this was loaded using WYSIWYG or CKEditor module.
Comment #13
xamountI tried the patch at the very top and I also tried the patch at #11. Both did not work.
I'm using the CKEDITOR via Wysiwyg.
Drupal 7.18
CKEditor 3.5.0.6260 (via Wysiwyg)
@Deciphered: how did you get this to work exactly? I applied your patch and the ckeditor field still was not saved via autosave.
The steps I did:
1. Applied your patch.
2. Opened a node that has autosave enabled. Made 2 changes to 2 different fields. One ckeditor field and the node title. (I have the autosave timer set to 10s, so I made sure to make these changes withing 10s).
3. Went to a different page without saving the node.
4. Went back to the same node and hit restore from the autosave prompt.
5. Only the node title field was restored.
Any suggestions welcomed. Thanks
Comment #14
deciphered@xamount,
This was one of three patches required for me, I can't remember the specifics now as I was reviewing the functionality on behalf of a client and it was determined that while once three patches where applied it did somewhat work, there where too many issues with the functionality and it would be best not to go ahead with it for the time being.
Comment #15
pjcdawkins commentedI opened #1894354: Support CKEditor and added a patch before I found this issue. So you might want to look at my patch which works for me, re-attached here.
Comment #16
pjcdawkins commentedComment #17
freblasty commentedPatch in #15 works for me but changed
editorElement.val(editor.getData());toeditor.updateElement();Comment #18
freblasty commentedPatch based upon #15 with change mentioned in #17.
Comment #19
deciphered@freblasty
Please include an interdiff.txt with your patch if your patch is a re-roll of another patch, it helps others review the patch alot easier.
Comment #20
dave reidTested and confirmed #18 works at a basic level with CKeditor 3 and WYSIWYG module. Committed to 7.x-2.x. Let's use follow-ups for anything else remaining like #1965880: CKEditor v4 not autosaving.
http://drupalcode.org/project/autosave.git/commit/72bc7d3