FCKEditor Configuration

Events happening in the community are now at Drupal community events on www.drupal.org.
ceaker's picture

I'm working on a site with an audience that will want to use a WYSIWYG Editor for content updates. Currently I'm trying to set up FCKEditor for the site. Everything looks good except there are some options in the FontFormat dropdown that I would like to remove. I've tried following the instructions on the FCKEditor site <a href="http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_File>here, but changes to FCKConfig.FontFormats in fckconfig.js aren't getting applied to the site editor.

Has anyone had any luck removing any of the default options from the 'Format' dropdown in FCKEditor?

Comments

Rich Text Editors. Meh.

knieveltech's picture

Seems like every site under the sun wants one of these things and as soon as you have it set up the users commence to pasting directly from MS Word. :/ Anyway, I've used both FCKEditor and TinyMCE. Of the two TinyMCE is substantially more configurable without a bunch of tinkering with config files and the like. You might want to take a look at the WYSYWIG module. As far as I've heard it's being touted as the RTE of choice for Drupal 6.

Co-Signin' What He Said

tingham's picture

You're absolutely correct in that the WWG module has figured out all the kinks in rolling an RTE into your site. It makes the process pretty much painless (except for that pesky page break tag that doesn't seem to work at all.)

Highly recommend letting the fine boys and girls over at WYSIWYG do that lifting for you.

I agree, but...

ceaker's picture

Let me share a little more history. The group I'm building this website for historically had a tech person on staff. The culture (that I'm working on changing) was that websites are updated by by people that live in window-less basements, eat nothing but moonpies, RC cola, Doritos and understand the technical black magic necessary to update a webpage. So while I'm quite aware of the issues and drawbacks of RTEs, successfully changing this culture will be hard enough without using mystical incantations like 'HTML'. Enter the need for a RTE.

Another part of this culture is the view of a website as a whiteboard where everyone can express their own creativity. So concepts like branding, cohesiveness, and a consistent theme haven't been strongly followed. This is another thing I would like to try to change. This is why I want to severely limit what tags are allowed through an RTE. No font choice, no color selection, and limited access to HTML tags. I've figured out how to remove the font choice and color choice widgets from the toolbar. If I could just remove the h1 and h2 tags from the FontFormat, I'd have pretty much exactly what I'm looking for.

Originally, I did try using the WYSIWYG API with TinyMCE. The major issue I have with TinyMCE is that, last I looked, it couldn't handle the recent feature of defining a teaser that isn't part of the full body (I really like that feature). I tried using FCKEditor with the WYSIWYG API and as of a few months ago, it didn't work so well. Don't recall the specific issues, but I think I just couldn't get it to work at all. So I abandonded WYSIWYG API and installed the FCKEditor module since FCKEditor seems to be getting more active support as of late. At the time I originally started working on this, it appeared that further WYSIWYG development was dependent on funding. Since it didn't yet do everything I needed I was a little nervous about throwing my lot in with something that didn't appear to have been fully embraced by the community yet. Maybe that's changing.

So, while using an RTE is a requirement in my current environment, I'm not really a crusader for any specific RTE. I do need the ability to limit the RTE features available for the sake of reigning in user's 'creativity' a bit. And I'd like to be able to use the new 'Show summary in full view' node feature.

I'm still not clear on how to remove specific tags from the default FontFormat dropdown. Julia, I'm afraid I might need a little more detail than what you provided in your post. Is there any interest in looking at RTE options for Drupal in one of our meetups or hack nights?

@beaker: I'd be happy to

JuliaKM's picture

@beaker: I'd be happy to show you how I got rid of those FontFormat tags tonight.

I've been looking into switching to tinyMCE this past week since it's used in other parts of AASHE's website. It looks like the dev version of 6 plus WYSIWYG API provides some default Word stripping.

Cover briefly at meeting tonight?

hallman's picture

Could we talk about this stuff briefly as part of the meeting tonight?

I've been planning on switching from TinyMCE to FCKeditor. Also, http://drupal.org/project/tinymce says: "This module has been replaced by Wysiwyg API, which (also) integrates the TinyMCE editor with your Drupal site and provides the same functionality. Most (if not all) users should install or migrate to Wysiwyg API instead."

I'm a little confused. I think my problems with TinyMCE may be that I don't have it configured well.

Judy Hallman

Judy Hallman

WYSIWYG Module

kwinters's picture

The WYSIWYG module makes configuring all the complex options of MCE pretty easy, but has some issues of its own. It doesn't play very nice with MCE v2 (or at least without coding), and some other modules don't work nice with MCE 3 (in particular some image upload modues, but IMCE works).

You are supposed to be able to run FCK through WYSIWYG API as well but I haven't done it in practice.

Ken Winters

www.coalmarch.com

Ken Winters

Sounds familiar.

knieveltech's picture

I wonder if these issues stem from the same class of javascript nonsense that caused earlier versions of Devel to tank the interface for imagefield?

FCKEditor Custom Drop-downs

JuliaKM's picture

Configuring WYSIWYGs can be confusing! I can't get your link to work but I think that you need to create a theme-specific fckstyles.xml file that's copies over from the FCK Editor module folder.

I've had to do the following to get my default Font pull-down and not the FCKEditor one to show up:
1) fckstyles.xml is customized in my themes folder
2) fckeditor.css is in my themes folders
3) fckeditor.config.js is customized in fckeditor/fckeditor.config.js
4) Set FCKEditor to use your themes fckstyles.xml and fckeditor.css files at:
admin/settings/fckeditor/edit/Default under the "CSS" fieldset by changing "Predefined styles:" and "CSS Path".

FCK MS Word

museumwebbie's picture

Seems like every site under the sun wants one of these things and as soon as
you have it set up the users commence to pasting directly from MS Word. :/

That's exactly what happened on our site! I told the staff not to do it, I put a big STOP sign in the documentation with "DO NOT PASTE TEXT FROM MICROSOFT WORD!" and some of them still did it. Deleting their submissions and making them re-do them from scratch seems to have finally gotten through to them. >:)

I'd also like to change some of the settings on fckeditor, but it's not real high on my priority list at the moment. Still, good to know where the config files are!

One thing to keep in mind is

knieveltech's picture

One thing to keep in mind is regardless of what RTE you're using the system is still predicated on Drupal's content filters. This means if you're having a rough time stripping a particular tag out of the RTE you can just remove it from the filtered HTML tag whitelist and you're good to go.

hallman's picture

FCKeditor with IMCE -- In the book "Using Drupal," p 77, "the FCKeditor has an edge, in that more Drupal 6 sites use it and the developers are much more active in maintaining it."

OpenSourcery.com used FCKeditor in their Webinar on "Drupal Modules: Community Building."

I Googled: tinymce vs. fckeditor drupal 6

A vote for FCKeditor -- http://www.ingraminnovation.com/ingraminnovation/blog/08/11/05/tinymce-v...

FCKeditor vs TinyMCE, 11/16/2007, It's official - we are migrating to FCKeditor, http://www.freshblurbs.com/fckeditor-vs-tinymce

Nick Lewis blog: Preferred FCKeditor, 10.08.2008, but then I think he goes with YUI -- Yahoo -- http://www.nicklewis.org/node/994. Some of the comments are interesting,
"In my experience with FCKeditor, i've found the time when it's most likely to produce unacceptable code is when content is pasted in which was copied from a word processor like Word or a web browser (but especially Word). I'm not sure this is entirely FCKeditor's fault, though, because the HTML that results from pasting in Word content looks suspiciously similar to what you get if you save a Word document as an HTML file. If you stay inside FCKeditor and only paste in content which has been stripped of formatting, FCKeditor does all right."


A review of the current state of TinyMCE, FCKeditor and WYSIWYG API
18 Jan 2009 -- http://ceardach.com/blog/2009/01/review-current-state-tinymce-fckeditor-...

TinyMCE and drupalbreak and pagebreak http://drupal.org/node/291622 -- http://drupal.org/node/291622 --http://drupal.org/node/247163


At the Drupal hack May 12, from what I could hear, it's not my settings -- neither TinyMCE nor FCKeditor work when text is copied and pasted from MS Word.

I plan to use FCKeditor, but strip out most of the formatting options.

Judy Hallman

Judy Hallman

Paste from MS word is alway BAD

swordedge's picture

When ever I paste from MS word, I have to switch to view source code and strip more than half of what gets pasted. This is not good if you want normal computer users to do the pasting.

As for stripping out formatting options, when you install it, carefully read the readme.txt configure section.

Number 6 from the fckeditor readme sets formatting options.
6. For the Rich Text Editing to work you also need to configure your filters
for the users that may access Rich Text Editing.
Either grant those users Full HTML access or use the following tags:

List of tags is next, the forum editor breaks if they are present... It tries to interpret them and I don't want to take the time to figure out how to tell it not to do that. You only include the ones you want them to have. You can still have the full list to yourself.

FYI, I recently made a holder page while I did some stuff. The page contained three lines and I didn't include the link yet. The word produced HTML file was over 7400 bytes long. My stripped version "with the link" was 246 bytes. A lot of this is because MS still doesn't understand that the word default means DON'T INCLUDE IT.

stripping out Word formatting

cdragin's picture

I cut and paste from Word into TextEdit, then cut and paste again into whatever program I'm using. I think TextEdit is mac-specific, but I imagine NotePad on the PC would do the same.

Notepad does the same.

kwinters's picture

Notepad does the same format removal. There are often other ways to remove format but pasting through textedit / notepad is usually easiest (but textedit needs to be in plan text mode, not rich text).

However, getting someone who insists on writing web content in Word to use this method is still going to be a challenge. Really it's better to write it in plain text to start with and then add formatting after the content is done.

I don't really like composing directly in the web interface, because too many things can cause my work to be ruined. Even if Drupal were 100% bug free, your save could still be chewed up by a network outage or a browser crash.

Ken Winters

www.coalmarch.com

Ken Winters

Plain text editors get it close

eff_shaped's picture

I've tried pasting from Word into Notepad and then into wysiwyg with FCKeditor. Usually get br-tags where I want p-tags and I've seen some other odd tags get through. But it's the cleanest I've found.

Which leaves me and my editors in the same kettle of fish. Either I have to teach them html or follow behind and tidy up.

I'm going to try getting them to write directly in Notepad.

Would be nice to have an efficient filter to use. Is there one?

CKEditor

swordedge's picture

I haven't looked into it yet but the next version of FCKEditor is called CKEditor. They rewrote it but I do not know if it is ready for deployment on drupal yet. Nor do I know how well it deals with all the extraneous garbage word insist on putting into its text. Like you, I generally just use notepad or something like it when I have to move text from word to drupal.

http://drupal.org/project/ckeditor

What about MarkDown?

Screenack's picture

I like the simplified approach taken by MarkDown http://drupal.org/project/markdown and Textile.

This can be done easily through configuration only.

venkatadapa's picture

This can be done easily through configuration only.

  1. Goto admin/settings/fckeditor
  2. Click on edit link of any profile, Advanced is the profile by default for admin, So click on it or open admin/settings/ckeditor/edit/Advanced
  3. Expand Cleanup and Output fieldset
    Look for FONT FORMATS: and remove the un-necessary tags from the list what ever you want.

Save the configurations.

Thats it.

triDUG

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: