1

I use CKEditor for my text editor, when client edit a text with CKEditor and change the font color, font size and ... I store the HTML code in my database and there is no problem.

but when I want to show the HTML Code in my page, the style will reset so many html tags not work, like font size or font color and ...

I use Eric Meyer’s “Reset CSS” 2.0 : http://meyerweb.com/eric/tools/css/reset/

this is CKEditor WYSIWYG screenshot : enter image description here

This is CKEditor HTML Code : enter image description here

And this is result :

enter image description here

and this is firebug screen shot for this layer style : enter image description here

I need to un-reset the CSS for this layer, is it possible ?

MajAfy
  • 3,007
  • 10
  • 47
  • 83

2 Answers2

0

You should be able to do this with the CSS :not selector, by resetting all the elements that are not within the WSYIWYG Editor code.

Or, if you have control over the styles, you could an !important declaration on the editor styles.

Ian
  • 5,704
  • 6
  • 40
  • 72
0

You may consider using http://binarystash.blogspot.com/2014/01/unresetcss.html. It restores default HTML styles removed by Eric Meyer's reset.css.

Dave
  • 3,328
  • 7
  • 26
  • 30