{"id":1455,"date":"2017-12-12T11:24:46","date_gmt":"2017-12-12T03:24:46","guid":{"rendered":"http:\/\/www.baishitou.cn\/?p=1455"},"modified":"2017-12-15T19:51:21","modified_gmt":"2017-12-15T11:51:21","slug":"%e7%bb%87%e6%a2%a6dedecms%e5%ae%89%e8%a3%85%e7%99%be%e5%ba%a6%e7%bc%96%e8%be%91%e5%99%a8ueditor%e7%9a%84%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/www.baishitou.cn\/1455.html","title":{"rendered":"\u7ec7\u68a6DEDECMS\u5b89\u88c5\u767e\u5ea6\u7f16\u8f91\u5668ueditor\u7684\u65b9\u6cd5"},"content":{"rendered":"
1.\u6839\u636e\u4f60\u7684\u7f51\u7ad9\u7f16\u7801\uff0c\u4e0b\u8f7d\u76f8\u5e94\u7f16\u7801\u7684\u7f16\u8f91\u5668\u5305\u3002\u5728include\u6587\u4ef6\u5939\u91cc\uff0c\u65b0\u5efa\u4e00\u4e2a\u540d\u4e3aueditor\u6587\u4ef6\u5939\uff0c\u628a\u521a\u624d\u4e0b\u8f7d\u7684\u6587\u4ef6\u653e\u5230\u91cc\u9762\u3002<\/p>\n
<\/p>\n
2.\u6253\u5f00include\u4e0b\u7684inc\u6587\u4ef6\u5939\u5185\u7684inc_func_funcAdmin.php\u627e\u5230184\u884c\uff0c\u5728\u4e0b\u9762\u653e\u5165\u4e0b\u9762\u7684\u4ee3\u7801\uff0c\u7136\u540e\u4fdd\u5b58\u3002\u8fd9\u6bb5\u4ee3\u7801\u662f\u53ea\u6709\u4e00\u4e2a\u7f16\u8f91\u5668\u7684\u60c5\u51b5\u4e0b\u4f7f\u7528\u3002<\/p>\n
\/\/\u767e\u5ea6\u7f16\u8f91\u5668\r\nelse if($GLOBALS['cfg_html_editor']=='ueditor')\r\n{\r\n $fvalue = $fvalue=='' ? '<p><\/p>' : $fvalue;\r\n$code = '<script type=\"text\/javascript\" charset=\"utf-8\"\r\nsrc=\"\/include\/ueditor\/ueditor.config.js\"><\/script>\r\n <script type=\"text\/javascript\" charset=\"utf-8\"\r\nsrc=\"\/include\/ueditor\/ueditor.all.js\"><\/script>\r\n<link rel=\"stylesheet\" type=\"text\/css\"\r\nhref=\"\/include\/ueditor\/themes\/default\/css\/ueditor.css\"\/>\r\n<textarea name=\"'.$fname.'\" id=\"'.$fname.'\"\r\nstyle=\"width:100%;height:400px;\">'.$fvalue.'<\/textarea>\r\n<script type=\"text\/javascript\">var ue = new\r\nbaidu.editor.ui.Editor();ue.render(\"'.$fname.'\");<\/script>';\r\nif($gtype==\"print\")\r\n{\r\n echo $code;\r\n }\r\n else\r\n{\r\n return $code;\r\n}\r\n}<\/code><\/pre>\n
<\/p>\n
\u4e0b\u9762\u7684\u4ee3\u7801\u662f\u591a\u4e2a\u7f16\u8f91\u5668\u65f6\u4f7f\u7528\u7684<\/p>\n
\/\/\u767e\u5ea6\u7f16\u8f91\u5668\r\nelse if($GLOBALS['cfg_html_editor']=='ueditor')\r\n{\r\n\t$fvalue = $fvalue=='' ? '<p><\/p>' : $fvalue;\r\n\t$code = '<script type=\"text\/javascript\" charset=\"utf-8\" src=\"http:\/\/apps.bdimg.com\/libs\/jquery\/1.6.4\/jquery.min.js\"><\/script><!--\u9700\u8981jquery\u89e3\u51b3\u591a\u4e2a\u767e\u5ea6\u7f16\u8f91\u5668\u540c\u65f6\u4f7f\u7528-->';\r\n\t$code .= '<script type=\"text\/javascript\" charset=\"utf-8\" src=\"'.$GLOBALS['cfg_cmspath'].'\/include\/ueditor\/ueditor.config.js\"><\/script>';\r\n\t$code .= '<script type=\"text\/javascript\" charset=\"utf-8\" src=\"'.$GLOBALS['cfg_cmspath'].'\/include\/ueditor\/ueditor.all.min.js\"><\/script>';\r\n\t$code .= '<script type=\"text\/javascript\" charset=\"utf-8\" src=\"'.$GLOBALS['cfg_cmspath'].'\/include\/ueditor\/lang\/zh-cn\/zh-cn.js\"><\/script>';\r\n\t$code .= '<link rel=\"stylesheet\" type=\"text\/css\" href=\"'.$GLOBALS['cfg_cmspath'].'\/include\/ueditor\/themes\/default\/css\/ueditor.css\"\/>';\r\n\t$code .= '<script type=\"text\/plain\" name=\"'.$fname.'\" id=\"'.$fname.'\">'.$fvalue.'<\/script>';\r\n\tif($bbcode)\r\n\t{\r\n\t\t$code .= '<script type=\"text\/javascript\">jQuery.noConflict();jQuery(function(){var ue = UE.getEditor(\"'.$fname.'\",{toolbars:[[\"Source\",\"|\",\r\n\t\"bold\", \"italic\", \"underline\",\"|\",\"fontsize\",\"forecolor\",\"emotion\",\"Undo\", \"Redo\"]],initialFrameHeight:100});});<\/script>';\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$code .= '<script type=\"text\/javascript\">jQuery.noConflict();jQuery(function(){var ue = UE.getEditor(\"'.$fname.'\",{initialFrameHeight:450});});<\/script>';\r\n\t} \r\n\r\n\tif($gtype==\"print\")\r\n\t{\r\n\t\techo $code;\r\n\t}\r\n\telse\r\n\t{\r\n\t\treturn $code;\r\n\t}\r\n}<\/code><\/pre>\n <\/p>\n
3.\u5728\u540e\u53f0\u7ba1\u7406\u7cfb\u7edf-->\u7cfb\u7edf\u57fa\u672c\u53c2\u6570-->\u6838\u5fc3\u8bbe\u7f6e-->\u5c06 Html\u7f16\u8f91\u5668\u7684\u503c\u6539\u4e3a ueditor \uff0c\u7136\u540e\u4fdd\u5b58\u3002<\/p>\n