Try a lot of code on the Internet, finally found this section of success, to retain:
The code is as follows |
Copy Code |
else if ($GLOBALS [' Cfg_html_editor ']== ' ueditor ') { $fvalue = $fvalue = = "? ' <p></p> ': $fvalue; $code = ' <script type= ' text/javascript ' charset= ' utf-8″src= '. $GLOBALS [' Cfg_cmspath ']. ' /include/ueditor/ueditor.config.js "></script>"; $code. = ' <script type= ' text/javascript ' charset= ' utf-8″src= '. $GLOBALS [' Cfg_cmspath ']. ' /include/ueditor/ueditor.all.min.js "></script>"; $code. = ' <link rel= ' stylesheet ' type= ' text/css ' href= '. $GLOBALS [' Cfg_cmspath ']. ' /include/ueditor/themes/default/css/ueditor.css "/> '"; $code. = ' <textarea name= '. $fname. ' id= '. $fname. ' style= ' width:100%; > '. $fvalue. ' </textarea> '; $code. = ' <script type= ' text/plain ' name= '. $fname. ' id= '. $fname. ' > '. $fvalue. ' </script> '; if ($bbcode) { $code. = ' <script type= ' text/javascript ' >ue.geteditor ("'. $fname. '", {toolbars:[["Source", "|", "Bold", "Italic", "Underline", "|", "fontsize", "ForeColor", "Emotion", "Undo", "Redo"]],initialframeheight:100});< /script> '; } Else { $code. = ' <script type= "Text/javascript" >ue.geteditor ("'. $fname. '", {initialframeheight:450}); </script > '; } if ($gtype = = "Print") { Echo $code; } Else { return $code; } }//BD End |
The replacement step also simply records:
1, download Ueditor and change the name put in the Dedecms "include" directory;
2, modify the Include directory in the "inc" directory in the "inc_fun_funadmin.php" file, find the "Get Editor" section of the function "Spgeteditor" code, in its "else" before adding such as code;
3, into the dedecms background → system → system basic parameters → core settings, modify the name of the HTML editor ueditor.