简体   繁体   中英

Tiny MCE Editor: Create preset blocks of text to insert from toolbar

Does anyone know how I create preset blocks of text to insert from a list in the toolbar?

I have an email API that I have integrated with a CMS and an admin can create a new email message to go out using custom tags. When the CMS detects these custom tags it replaces them with the proper code/links/text, etc. I don't want to have the list of tags beside the editor; rather, I'd prefer there being a dropdown list in the toolbar that has my tags pre-set, kind of like in the CKEditor (if you've used this yet) the custom styles option which I can add/edit through my config.js file. I hope this makes sense. I couldn't seem to find any results while searching.

Anyone have any experience with this?

Thanks!

Solution will be to write an own tinymce plugin that will wrap the selected text into pre -elements that can be replaced serverside. The code would be partial the same as the style plugin that ships with tinymce.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM