Dream dedecms Background HTML editor for Baidu editor method

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.