noufalcep
noufalcep

Reputation: 3536

CK Editor styles not working

I am using CK Editor 4.5 as text editor in my form. I have pasted my html code including "style" tags to the editor. But when saving the data it automatically removes the style tags from the code.

I have tried to turn off Automatic Content Filtering by add this to config file

config.allowedContent = true;

But it still remove the style tags. The editor also removes the text color, text align styles added.

How can i add style tags using CK Editor.?

Upvotes: 0

Views: 1163

Answers (2)

Renny Ren
Renny Ren

Reputation: 107

I'm using Rails and met the same issue, it turns out that I'm using sanitize to render content, which will remove the inline styles.

Upvotes: 2

noufalcep
noufalcep

Reputation: 3536

My apologies. Its not the issue of ckeditor.

I am using codeigniter for server scripts. It removes inline style on form submit.

Upvotes: 2

Related Questions