Dear frJericho,
For Adding code snippets in Javascript, please refer the following demo (put the js in head node)
- <script type="text/javascript">
- function RichTextEditor_OnLoader(loader) {
- var config = loader._config;
- config.templategrouparray = [{
- "text": "leveltop",
- "groups": [{ "text": "leve1", "groups":[], "templates": [{ "text": "level1_1", "href": "", "code": "level1_1" }, { "text": "level1_2", "href": "", "code": "level1_2" }] },
- { "text": "leve2", "groups": [], "templates": [{ "text": "level2_1", "href": "", "code": "level2_1" }, { "text": "level2_2", "href": "", "code": "level2_2" }] }],
- "templates": [{ "text": "level0", "href": "", "code": "level0" }]
- }];
- config.templateitemarray = [{ "text": "level0_1", "href": "", "code": "level0_1" }, { "text": "level0_2", "href": "", "code": "level0_2" }];
- }
- </script>
If you want to customize the heading, you can open file "richtexteditor/dialogs/inserttemplate_dropdown.xml"
<groupbox text="@codesnippet" dock="top" overflow="visible" margin="3">
if you just want to change text, replace @codesnippet with your text
if you want to use html tag, you need to use our jsml language, such as
<label dock="top" text="MyTitle"></label>
Regards,
Jeff