DescriptionCurrently we haven’t provided with in-built support for syntax highlighter in RTE. However, this can be achieved using some third party tools/plugins that will allow you to highlight the code blocks. SolutionIn below sample, we have used CodeMirror plugins to highlight HTML, Javascript and CSS using custom tool. Add the CodeMirror references to the script section as follows.
Javascript
Render the RTE control, use “customTool” options to add the “div” in the Toolbar.
Javascript
Upon click to the “div” element, the “Dialog” control will be open. From that insert any HTML, CSS or JavaScript syntax to the RTE. The syntax has been inserted to the RTE using “executeCommand” method.
Javascript
|
This page will automatically be redirected to the sign-in page in 10 seconds.