Hello,
We're experiencing a problem using CKeditor.
The content of a textarea with CKeditor, is not being saved when hitting "Save". Moreover: it removes (!) all text from that textarea, so we have to type the text all over. On top of that we get an alert that the field that has been emptied by CKeditor is obligatory, so it can't be saved at all.
We càn save content in the textarea when we "Switch to plain text editor". But our customers have no HTML-knowledge at all, so that's not an alternative.
Here are the format settings of "Filtered HTML":
![]()
We have already unchecked all filters in order to find out if it had something to do with it, but with no result (HTML-corrector, HTML-filter, Inline-images, Line break-converter, URL-filter).
This is the configuration of "Filtered HTML":
![]()
[x] Remove forbidden tags
[ ] Disable tags
Allowed tags:
<a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <h2> <h3> <h4> <h5> <img>
Checking "Disable Tags" instead of "Remove forbidden tags" had no result either.
I've gone through CKEditor is incompatible with the Ajax module, checking the links that are mentioned, with no result (I'm not using the Ajax module either).
Have you got an idea what could be the problem please?
Comments
Comment #1
knalstaaf commentedI forgot that img-tags are not supported here. You'll find the screenshots below as a link. We're using the Garland theme btw.
Comment #2
knalstaaf commentedWe've found out that this method is working:
But we can't ask our customers to "Switch to plain text editor" and after that "Switch to rich text editor" again before they save every post they make - that would be ridiculous. It may however indicate where the problem is located.
Can you help us out?
P.S.: We're using Firefox 3.6.8, but the problem occurs on Google Chrome as well. So we don't think it's browser related.
Comment #3
knalstaaf commentedWe may have found a clue. When the WYSIWYG-module (6.x-2.1) is disabled, the problem is solved.
We do need that module however (for the IMCE Wysiwyg API bridge-module).
Comment #4
Diogenes commentedI think the problem may be with the WYSIWYG-module. I have a similar config and have duplicated the problem (I think).
Re-enable the WYSIWYG-module. Then go to /admin/settings/wysiwyg and look at Basic Setup for each profile. I currently DO NOT have the "Enable by default" option checked. I thought this made sense at first because I had already enabled CKEditor under the /admin/settings/ckeditor {profile} Editor Appearance / Enabled option.
With this setup anything I enter into a ckeditor box disappears! Check the "Enable by default" option and the problem disappears.
At one point I had accidentally enabled the "enable/disable" option in both wysiwyg and CKEditor profiles, so I had the option show up twice under the CKEditor box (slightly different wording between them). Each option worked fine, but switched between different instances of a CKEditor object.
If you duplicate the all the 'problem' conditions above, you might see it for yourself. If you use firebug to examine the html and CSS, it should provide another WTF moment.
So if this works for you, please feel free to change the category.
Looking back on this, I'm not sure it's even a bug, but the problem is not with the ckeditor module.
Comment #5
knalstaaf commentedI've gone through the problem conditions above and I think this should be issued to the WYSIWYG-module indeed.
Thanks for your support, Diogenes!
Comment #6
twodThe problem is not in Wysiwyg module, and also not in CKEditor module.
The problem is that these modules should not be used together. They are and will always be in conflict!
If you have settings in both admin/settings/wysiwyg and admin/settings/ckeditor, it means both modules are active at the same time. Disable and uninstall either of them (depending on your preferences and other installed modules).
Both modules act as "wrappers" around or implementations of the CKEditor library and use two different approaches to how they are integrated with Drupal's input/text formats and what settings can be configured.
CKEditor.module obviously focuses on just CKEditor and has a bit of a head start, while Wysiwyg.module can theoretically work with any editor and will soon catch up. (All editor settings can be set via Wysiwyg module as well, but you currently need a PHP and/or JavaScript snippet.)
Comment #7
knalstaaf commentedI can see clearly now, thank you.
In fact, that was the question that arose with me: is the Wysiwyg-module dependent on the configuration I'm using? I must have mixed up the requirements for the CKeditor, with the requirements of a Wysiwyg-editor altogether. I wasn't sure because in the documentation it says: Supported editors/plugins: CKEditor, FCKeditor, jWysiwyg, (...).
Eitherway, it's solved and I'm glad I can use CKeditor, because it's the best editor I'm aware of so far.
Comment #8
twodYes, Wysiwyg module supports the editor/library CKEditor (http://ckeditor.com), amongst several other editors, but not the CKEditor Drupal module (which also supports/implements the editor/library from http://ckeditor.com). At the top of the Wysiwyg project page it also says No other Drupal module is required. ;)
Comment #9
knalstaaf commentedI get the full picture now: if you download the Wysiwyg-module, you only need to download the necessary files from the specific editor's parent website (e.g. ckeditor.com instead of the full module Drupal.org).
Thanks, that cleared it up. Using this module combined with the ckeditor.com-files makes it easier to switch to another editor in other words. Cool!
Comment #10
Diogenes commentedActually I have both the wysiwyg and ckeditor modules enabled and it all works fine IF I have both enabled in their respective configurations. This does not make sense to me - but I only see one ckeditor active in Firebug in this situation.
If I have the wysiwyg setting disabled (admin/settings/wysiwyg/profile/1/edit - Basic Setup - Enabled by default), I see 2 instances of the ckeditor input, though only one is ever visible to the user owing to js hide/expose routines. The user enters info into one instance but the Preview/Save action uses the data from the other instance. So it looks like you have lost the data.
If you switch between the plain text / wysiwyg views (depending on which switch you select) the data is copied to the plain text box - so then you see it - and it might be saved - if you switch back to the wysiwyg view before you preview/save. I think others have experienced this behavior.
So I think it may be a bug. It was definitely a WTF moment for me! ;-)
That said, isn't one of the advantages of having both the ckeditor and wysiwyg modules working together is that it provides a bridge to Drupal's standard Filtered HTML and Full HTML in /admin/settings/filters/ ?
Comment #11
twodWysiwg module and CKEditor module will never work together, exactly because of the examples you mentioned above. There is no advantage to having both modules active at the same time, only disadvantages.
CKEditor module doesn't know about the editor instances created by Wysiwyg module, and vice versa. The CKEditor library does keep track of this and will throw errors when an attempt is made to create the same instance twice. Both modules would have to catch this step out of the way for the other modules when conflicts are detected.
However, doing so would resolve nothing. An attempt to recreate an editor is still an error, both programatically and logically. Wysiwyg won't be able to apply the editor settings it has been instructed to provide if an instance already exists, and none of the modules and plugins depending on Wysiwyg could be guaranteed reliable access to the editors. Same thing goes for CKEditor module if Wysiwyg created the instance.
When Wysiwyg module "disables" an editor instance, it is completely destroyed, to avoid incompatibilites with other editors and the original textarea during form submit ot when an instance of a different editor is created. CKEditor module, as far as I can remember, just hides the editor elements and displays the original textarea after syncing. It expects no other editor libraries to be present or taking control of the field.
There would also be conflicts in the global settings which apply to the entire CKEditor library. If the modules attempt to load two different variants (or even versions) at once, or just use different base paths, there will be major problems.
I'm not sure what you mean by both modules together providing a bridge to the input/text formats. Wysiwyg module does this on its own and always associates an editor instance to a specific input/text format to keep serverside and clientside settings/privileges in sync.
Installing CKEditor module on top of this adds nothing and only causes confusions as now you have multiple configurations for what appears to be the same thing under admin/settings/wysiwyg and admin/settings/ckeditor.
Just uninstall either module, they are not designed to be used together and will never be able to co-exist except by pure luck.
Comment #13
dibya commentedyes . I faced similar problem - my content were not displayed. I disabled wysiwyg and now it is working
Comment #14
Diogenes commented@TwoD
This should be mentioned explicitly on the project page. The wysiwyg module disables the ckeditor module without any warning, log entry, or even mention in the documentation. This need to be corrected.
I noticed that you added ckeditor to the blacklist in wysiwyg_enable() not log after posting #11. In the absence of any other effort to deal with this problem, I would say this is no improvement at all.
Comment #15
twodFine, but please don't hijack issues. This was a request for help with using CKEditor.module + Wysiwyg.module, which is not supported.
I've created a new issue to deal with the documentation etc over at #1781890: Improve documentation about usage with other editor modules.