Initialize the editor by using a script and configure parameters as follows:
New TINY. editor. edit ('editor', {id: 'input', // (required) The idwidth: 584, // (optional) width of the textarea defined in step 2 above. height: 175, // (optional) height of the editor cssclass: 'te', // (optional) class of the editor, used to control the style controlclass: 'tecontrol' through css, // (optional) classrowclass: 'tehead' for buttons in the editor, // (optional) classpiderclass: 'tepiider 'For the row of the editor button, // (optional) style of line separation between Editor buttons controls: ['bold ', 'italic', 'underline', 'strikethangout', '|', 'subscript', 'superscript', '|', 'orderedlist ', 'unorderedlist', '|', 'outdent ', 'indent', '|', 'leftalign ', 'centeralign', 'rightalign ', 'blockjustify', '| ', 'unformat', '|', 'undo ', 'redo', 'n', 'font', 'SIZE', 'style', '|', 'image ', 'hr', 'link', 'unlink', '|', 'Cut ', 'copy', 'paste', 'print '], // (required) add button controls in the editor as needed. '|' indicates the vertical split line between function buttons, and 'n' indicates the split line between buttons footer: true, // (optional) whether to display the fonts at the bottom of the Editor: ['verdana ', 'arial', 'Georgia', 'trebuchet MS '], // (Optional) Select the font xhtml in the editor: true, // (optional) whether the editor generates xhtml or html-marked cssfile: 'style.css ', // (optional) the external css file content to be appended to the Editor: 'starting content ', // (optional) set the initial content css in the editor editing area: 'body {background-color: # ccc} ', // (optional) set the editor editing area background bodyid: 'editor', // (optional) set the IDfooterclass in the editing area: 'tefooter ', // (optional) set the classtoggle: {text: 'source', activetext: 'visualization', cssclass: 'toggle '}, // (optional) set the source code to browse and switch the text, and the classresize: {cssclass: 'resize'} // (optional) set the class} of the editor size adjustment button });
It can be said that the configuration is highly configurable and the configuration items are clear.