TinyMCE custom formatting for pre -


i have looked everywhere , can't figure out how add option tinymce's drop-down formatting. duplicate , modify formatting pre tag give class of .prettyprint can add code snippets posts.

it should technically possible, how , file should amend. alternatively can add button applies formatting

you may add following (style_fomats setting) tinymce init function in order add new option styles dropdown. aware class applied should made available using the content_css configuration setting

    style_formats: [{         title: 'block styles'     }, {         title: 'name_to_be_displayed',         block: 'p',         classes: 'class_to_be_applied',          exact: true     }, {         title: 'inline styles'     }, {         title: 'red text',         inline: 'span',         classes: 'red',         exact: true     }, {         title: 'pre formatting',         inline: 'pre',         classes: 'xyzpre',         exact: true     }], 

alternatively can add button applies formatting

yes, need write own plugin, not difficult.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -