1

Is there a way to prevent styles and large fonts on a paste in tinymce? I have the content wrapped on display in the notes section below but tags still show increased fonts. I'd like just simple HTML like bold, bullets, and links.

.notes {
    font-size: 14px !important;
}
Mike Flynn
  • 22,342
  • 54
  • 182
  • 341

2 Answers2

0

open tinyMCE.init and add this code:

content_css : "css/custom_content.css",
theme_advanced_font_sizes: "10px,12px,13px,14px,16px,18px,20px",
font_size_style_values : "10px,12px,13px,14px,16px,18px,20px",

then you'll be able to use custom_content.css

From TinyMCE page (be sure to read for more info and examples)

Note: updating the actual content.css will have no effect. You need to create a copy and reference it in tinyMCE.init().
Devin
  • 7,690
  • 6
  • 39
  • 54
0

Editors like TinyMCE always have problems with html code on pastes. You can fiddle with the settings as much as you like, it remains problematic. But it would still be my first advice to tweak the settings of TinyMCE. After that you could use another HTML filter, like:

http://www.bioinformatics.org/phplabware/internal_utilities/htmLawed

It's, afterall, always better not to have rogue code in your pages.

KIKO Software
  • 15,283
  • 3
  • 18
  • 33