TinyMCE config for when non-technical people will be using it
So I’m working on a project where people that are completely computer illiterate will be using a WYSIWYG box. I didn’t want them pasting from word and it keeping all the messy html from word. I found this config to work very well.
tinyMCE.init({
mode : "textareas",
theme : "advanced",
plugins : "paste",
editor_selector : "mceEditor",
forced_root_block : false,
force_br_newlines : true,
force_p_newlines : false,
theme_advanced_buttons1 : "bold,italic,underline,separator,bullist,numlist,separator,link,unlink,separator,code,pastetext",
theme_advanced_buttons2 : false,
theme_advanced_buttons3 : false,
apply_source_formatting : false,
paste_auto_cleanup_on_paste : true,
paste_remove_styles : true,
paste_remove_spans : true,
paste_text_sticky : true,
setup : function(ed)
{ ed.onInit.add(function(ed)
{ ed.pasteAsPlainText = true;
ed.controlManager.setActive("pastetext", true);
});
}
});
More info about the paste as plain text stuff.



04. Aug, 2010 







About the author
No comments yet... Be the first to leave a reply!