I need a document type with some basic html pre-written in the MCE editor. It should work this way: I create a new page, and in one of the tabs the MCE editor will have the content of a table with some content, that can be edited and saved.
There is probably a smarter way than the one I'm suggesting right now. But I think it should be possible to achieve by using an action handler to accomplish the task. So everytime you create a certain document type in the tree the bodyText field is automatically filled in with the text you want.
yet another approach is to enable the TinyMCE template plugin. This will allow users to insert predefined "stuff" in the editor. Of course the predefined content won't be there when the page is created, the user has to select a template to do it.
Masood Afzal - I like your solution a lot! But I can't find the Prevalue field.. After I create a new datatype and choose the Tiny MCE editor, I can only choose between the buttons ect. but not a prevalue. Am I looking in the wrong place?
I have developed another datatype which accepts default values, its not exactly same as yours, but you can get a good idea from this. Let me know how can i send the source to you?
it is absolute easy (only creating a new datatype and upload a cuteeditor_client folder), but you are loosing things like media via umbraco or macros via editor...
Predefined content in editor
Hello
I need a document type with some basic html pre-written in the MCE editor. It should work this way:
I create a new page, and in one of the tabs the MCE editor will have the content of a table with some content, that can be edited and saved.
Is that possible?
Thanks in advance!
There is probably a smarter way than the one I'm suggesting right now. But I think it should be possible to achieve by using an action handler to accomplish the task. So everytime you create a certain document type in the tree the bodyText field is automatically filled in with the text you want.
You can get more info here http://umbraco.org/documentation/books/creating-and-using-an-action-handler and in this article by Richard http://www.richardsoeteman.net/PermaLink,guid,f470b6cf-40da-4aa9-a0d9-7b984fe9bf59.aspx
Hope that this makes sense :)
/Jan
Another approach is:
- Create a custom datatype for MCE editor (e.g. 'Richtext editor with default value').
- This datatype should allow setting default value in 'Settings' (using Prevalues), alllows you changing default text anytime from developer section.
- Create a property for your documenttype using this datatype.
yet another approach is to enable the TinyMCE template plugin. This will allow users to insert predefined "stuff" in the editor. Of course the predefined content won't be there when the page is created, the user has to select a template to do it.
The last two mentioned approaches would probably be better and easier to implement than the one suggested by me. I say +1 for both suggestions.
/Jan
Thanks to all for quick answers!
Masood Afzal - I like your solution a lot! But I can't find the Prevalue field.. After I create a new datatype and choose the Tiny MCE editor, I can only choose between the buttons ect. but not a prevalue. Am I looking in the wrong place?
Mathias,
I have developed another datatype which accepts default values, its not exactly same as yours, but you can get a good idea from this. Let me know how can i send the source to you?
Great! You can contact me at "baggadap {at} hotmail {dotcom}"
we are using cuteeditor instead of tinymce which has a templates build in. (cute editor is not free)
thomas
Thomas!
How easy is cuteeditor to integrate with Umbraco ?
Mikael
it is absolute easy (only creating a new datatype and upload a cuteeditor_client folder), but you are loosing things like media via umbraco or macros via editor...
can send you the code to integrate if you want
thomas
Masood Afzal, did you send me the datatype? I haven't recieved it yet..
/Mathias
Mathias, have emailed to you, let me know if any issues.
is working on a reply...