I'm new to drupal and have been having trouble getting CK Editor to work as advertised. I've been running Drupal 6.16, but just upgraded to 6.17 yesterday. The problem with CK Editor remains. I'm using the Hiroshige theme, though I tried switching to Garland and got the same results.
I'm trying to do very basic stuff as I am creating content -- changing text size or color, for example. These changes appear in the body area I am composing in, but then are lost when I preview or save the page. The only text features that survive are bolding and paragraph breaks. I just installed the HTML Purifier module, but that did not help. What am I doing wrong?
Initially I had my input filter set for Full HTML, and now I have it set for HTML Purifier.
One of the people posting on another issue advocated going to the WYSIWYG module. Am I likely to have any better luck with that?
Comments
Comment #1
elegantsolutions commentedA suggestion would be to try the DEV version of the module, it has fixed most of my problems.
Comment #2
MSC2006 commentedI did try updating to the 6.x-1.x-dev module and also updated to the 3.3.1 CKeditor engine while I was at it. Unfortunately this had no effect on the problem.
I have tried many things and learned things that I thought would solve the problem, but they haven't worked. For instance, in reading the fine print I discovered that not having a CKeditor profile named User 1 would create a default of using the authenticated user's settings. So I dutifully went to Administer-Site Configuration- CKeditor - create new profile and made a User 1 profile that is based on the Administrator settings.
But still the colored or enlarged text tags don't show up in the previewed or final content I am trying to create.
I have also gone into every Input format that I have (Administer- Site Configuration- Input Formats-) and have configured each one so that the allowed tags are included in the allowed tag list. I got the list of allowed tags from the readme file.
I've also tried making Garland my default theme, but still get the same results. I've also tried changing the input format on the page I am trying to create as I am composing, but that doesn't help either. I've tried them all -- Filtered HTML, Full HTML, PHP code, and HTML Purifier
Always the color and size settings get stripped and I am left with black text in the preview or final version.
I'm guessing there is some kind of permission that I am not setting correctly?
This is very frustrating, please help if you can!
Comment #3
elegantsolutions commentedLook at http://drupal.org/node/758614#comment-3113506
#15 to see if that helps.
Comment #4
MSC2006 commentedThanks for the info, but it doesn't help with my problem. I did check that my User 1 profile has Administrator privileges, so that is OK. Under the User profiles, I made sure that both Administrator and Authenticated users have rich text enabled, so that is OK.
When I edit the CKEditor (in Administer - Site Configjuration - CKEditor) there is a section for CSS options. Right now I have chosen CKEditor default as the Editor CSS. Would a different choice get me the color and text sizing options that I want?
Comment #5
elegantsolutions commentedI don't mean to be repetitive, but please tell me the 10 settings you have in:
"Rich text editor settings" in admin/user/1/edit
Comment #6
MSC2006 commentedOK, here goes...
Under Admin/User Management/Users/ I only have two users at the moment. One is User 1 and the other is Admin. When I edit User 1 here are the settings under Rich Text Editor Settings:
Default State: enabled
Show disable/enable Rich Text Editor toggle: Yes
Show field name hint below each rich text editor: Yes
Use CKEditor in a popup window: No
Skin: Kama
Toolbar: DrupalFull
Start the toolbar expanded: Expanded
Width: 100%
Language: English
Auto-detect language: Yes
Under Admin/Site Configuration/ CKEditor I have two profiles, "Advanced" and "User 1". Both have the same settings at the moment.
When I edit User 1 the following sections are displayed: Basic Setup, Security, Visibility Settings, Editor Appearance, Cleanup and Output, CSS, File Browser Settings, and Advanced Options.
Basic Setup - two roles are allowed to use this profile, Authenticated user and Administrator
Security - HTML Purifier, HTML Corrector, and HTML filter are selected
Editor Appearance -
Default State: enabled
Show disable/enable Rich Text Editor toggle: Yes
Use CKEditor in a popup window: No
Skin: Kama
User Interface Color: CKEditor default
Toolbar: DrupalFull
Start the toolbar expanded: Expanded
Width: 100%
Language: English
Auto-detect language: Enabled
Language direction: Get from current locale (default)
Cleanup and Output -
Enter mode: "p" inside greater/lesser than signs
Shift + Enter mode: "br" inside greater/lesser than signs
Font formats: p;div;pre;address;h1;h2;h3;h4;h5;h6
Use custom formatting options: No
CSS -
Editor CSS: CKEditor default
CSS path: (blank)
Predefined styles: CKEditor default
Predefined styles path: (blank)
File Browser Settings -- are all set to IMCE
I hope this info helps figure out the problem!
Comment #7
MSC2006 commentedI've been experimenting more with what information gets stripped out when I preview or save. It seems to be just stuff inside the "span" command. Here is a sample: I have copied the text from the body of my page using the "plain text editor" toggle. To get the code to appear in this post, I have replaced the < or > signs with a plus sign (+). For example, the following shows red text with a bold, large format in the body of my page using the "rich text editor" toggle. Here is the code:
+h1+
+span style="color: rgb(255, 0, 0);"+Red text+/span++/h1+
When I go to preview or save, the phrase "Red text" appears in a black, bold large format. The h1 formatting is definitely working, but the color has been stripped out. If I save and then go to edit the page, the body of the page has the text in red, but it still previews in black.
I did check to make sure that the "span" tag was included in the Administer/Site Config/Input Formats allowed HTML tags, and it is indeed there in all of my formats.
Any ideas why it might ignore the "span" tag?
P.S. Is there a way to paste in HTML code as text in a post like this so it can be examined in its natural state?
Comment #8
MSC2006 commentedI'm beginning to think this might be a bug rather than a problem with my setup or choices, since the "h1" tag works fine but the "span" tag does not. So I am changing the category to bug report. Any suggestions would be very welcome...
Comment #9
elegantsolutions commentedIt appears that you have set everything correctly. Try turning off the HTML purifier.
Also it appears that you are not the only one having problems with spans.
http://drupal.org/node/454408
I also believe that there is some issues with span in the CKEDITOR issues queue. Try searching there.
I am out of ideas, sorry.
Comment #10
MSC2006 commentedOK, thanks for your help. I'll try turning off HTML Purifier.
Comment #11
MSC2006 commentedWell I found out how to work around the problem!
The HTML filter is stripping out the style codes, even though they are inside "span" commands.
To fix this, go to Admin/Site Configuration/Input Formats, choose Configure for each input format and uncheck HTML filter (thats the default filter that seems to come with the Drupal core.)
I've also discovered that I can use HTML Purifier as a filter and that works just fine, as long as HTML filter is not selected.
This definitely seems like bad behavior on the part of the HTML filter!
Comment #12
dczepierga commentedPls update to new version of CKEditor module and plugin. This bug seems to not appear there.
It it doesn't help pls reopen it.