1

I am trying to edit the font size for CKEditor, however whenever I save these changes, the inline styles are removed.

Now I saw that it may be due to a custom Javascript configuration issue, and so I've put this in the Advanced Options dropdown:

config.allowedContent = true;

Even after putting this on both full and filtered, I've had absolutely no luck getting my inline styles to stay correct. What am I doing wrong? Is this a CKEditor problem, or a Drupal problem?

Nevermind, this is only happening on filtered. So I'm pretty sure it's just a Drupal setting in how filtered is configured. I'll post the solution soon.

0

1 Answer 1

3

You write:

Nevermind, this is only happening on filtered.

Sure! The Filtered HTML text format is supposed to do that.

For CKEditor, you need to configure the WYSIWYG filter module to retain inline styles (Unless you allow users to use the Full HTML text format. This is not recommended as it is insecure. The Full HTML text format lets unfiltered user input pass into rendered content.)

I am written up a short cookbook about configuring CKEditor for Drupal, including how you configure the CKEditor ACF and the the WYSIWYG filter text filter to give your users the power of the CKEditor without jeopardizing security.

Here's a link to my CKEditor cookbook.

4
  • is there a fix for this without having to go into the database itself? Nov 6, 2014 at 23:17
  • @duckx I don't understand this question. My recipe for setting up CKEditor do not require you to manipulate the database directly. Nov 7, 2014 at 6:51
  • This answer is relying on the OP using the WYSIWYG module with the CKEditor library, and not the CKEDitory Module; he hasn't made either of those options clear though. Jan 28, 2016 at 15:21
  • uio.no personal sites were moved to folk.universitetetioslo.no where the cookbook no longer exists, so I've found an archive.org version web.archive.org/web/20190716055644/http://heim.ifi.uio.no/gisle/…
    – Sandra
    Mar 27 at 22:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.