Due to the separation of the front and back, but also required to upload local pictures and so on a series of needs, where the use of TINYMCE to solve a lot of holes in the middle, write a memo.
The first page introduces
<type=src="/js/admin/tinymce.full.min.js"></Script ",
Also introduce the JS you need to instantiate
In HTML <id="text"></textarea>
The following is the page JS
ConstBAR1 = [' fontsizeselect fontselect formatselect ',' bold italic underline strikethrough ',' codesample blockquote subscript superscript ',' alignleft aligncenter alignright alignjustify ',' bullist numlist '];ConstBAR2 = [' ForeColor BackColor ',' outdent indent ',' link anchor imageupload ',' Table InsertDateTime ',' hr PageBreak ',' Pastetext unlink Removeformat ',' visualblocks code preview fullscreen ',' undo Redo '];Constfonts = [' song BODY = song,' Andale mono=andale mono,times ',' Arial=arial,helvetica,sans-serif ',' Arial black=arial black,avant Garde ',' book Antiqua=book Antiqua,palatino ',' comic Sans ms=comic Sans Ms,sans-serif ',' Courier new=courier new,courier ',' Georgia=georgia,palatino ',' Helvetica=helvetica ',' Impact=impact,chicago ',' Symbol=symbol ',' Tahoma=tahoma,arial,helvetica,sans-serif ',' Terminal=terminal,monaco ',' Times New roman=times new Roman,times ',' trebuchet ms=trebuchet Ms,geneva ',' Verdana=verdana,geneva ',' webdings=webdings ',' Wingdings=wingdings,zapf dingbats ']; TINYMCE Editor SettingsTinyMCE.suffix='. Min ';TinyMCE. Init ({selector:' #text ',Height: 400,MenuBar:false,language:' ZH_CN ',Convert_urls:false,Imageupload_url:'/treasureweb/fileupload/uploadpicture.do ',Plugins: [' lists link preview hr anchor pagebreak ',' wordcount visualblocks visualchars code fullscreen ',' insertdatetime Media table Imageupload ',' paste textcolor colorpicker codesample ' ],toolbar1: Bar1.join (' | '),toolbar2: Bar2.join (' | '),' Image_advtab ':true,' Imagetools_toolbar ':' Rotateleft rotateright | FLIPV fliph | editimage imageoptions ',' Font_formats ': Fonts.join (';')
});
Here imageupload is our own definition of plug-ins, need to put into the tinymce.js of the plugins of the same directory, imageupload inside is our own need to define plug-ins. The area of the pit is mainly due to the environmental packaging issues when online, will be prompted $ undefined here we directly introduce JQ in plugins or introduce CDN in front of the page.
Students who need imageupload can contact me.