How to apply pre-defined sections within the TinyMCE editor
For my writers in Umbraco, I would love to give them a pre-defined section layout they can see in TInyMCE. How can I apply this to a rich text editor in Umbraco?
one way to achieve this is by setting the property value fro the rich text editor when the node is first created.
it's a bit detailed but the general process is :
Attach to the ContentService.Created* event
When the event fires set the values of the property
When the editor creates a node they will see the values you set
The trick is getting the values you want in number 2 - a good idea is to have a "template node" somewhere that you read in and use to set default values.
*according to the current documentation ContentService.Created events are not guaranteed to trigger everytime - but in my experience they work for the above example fine
How to apply pre-defined sections within the TinyMCE editor
For my writers in Umbraco, I would love to give them a pre-defined section layout they can see in TInyMCE. How can I apply this to a rich text editor in Umbraco?
The HTML
The JavaScript
I pulled the above code from the official TinyMCE site.
Thanks for any tips!
hi,
one way to achieve this is by setting the property value fro the rich text editor when the node is first created.
it's a bit detailed but the general process is :
The trick is getting the values you want in number 2 - a good idea is to have a "template node" somewhere that you read in and use to set default values.
*according to the current documentation ContentService.Created events are not guaranteed to trigger everytime - but in my experience they work for the above example fine
Thanks Kevin. I'm not that advanced yet with .cs and event based modifications, but I will definitely take these steps into consideration.
Use the TinyMCE template plugin for Umbraco.
http://www.wiliam.com.au/wiliam-blog/adding-enhanced-styling-to-the-umbraco-tinymce-editor
After you do the above, make sure all those tag types you have there are allowed in the TinymceConfig.config's < validElements > section.
Shola thanks for bringing this solution up. It works for me. I can see this used as a template tool but also as a reusable HTML content tool as well.
Let me try to help you out
Here is my template-checkedList.html
Here is my templates-config.html
Let me know if you still have issue.
Manish
You rock bro. Thank you so much for the clarifying the process.
is working on a reply...