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.

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.

  • is there a fix for this without having to go into the database itself? – Patoshi パトシ Nov 6 '14 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. – Free Radical Nov 7 '14 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. – UnsettlingTrend Jan 28 '16 at 15:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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