织梦百度编辑器怎么用UM版本!

织梦怎么用百度编辑器UM简单版本! 

和UE一样的!不过下载mini版本!然后配置文件那里 ,js这样写! 不过这个不能直接截图  然后粘贴到里面!还是源版本好用点!

else if($GLOBALS['cfg_html_editor']=='ueditor')
{
 $fvalue = $fvalue=='' ? '<p></p>' : $fvalue;
$code = '
     <script src="/include/umeditor/third-party/jquery.min.js"></script>
     <link href="/include/umeditor/themes/default/css/umeditor.min.css" type="text/css" rel="stylesheet">
    <script type="text/javascript" charset="utf-8" src="/include/umeditor/umeditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="/include/umeditor/umeditor.min.js"></script>
    <script type="text/javascript">
    var serverPath = "/serv/include/umeditor/",
        um = UM.getEditor("editor", {
            imageUrl:serverPath + "imageUp.php",
            imagePath:serverPath,
            lang:/^zh/.test(navigator.language || navigator.browserLanguage || navigator.userLanguage) ? "zh-cn" : "en",
            langPath:UMEDITOR_CONFIG.UMEDITOR_HOME_URL + "lang/",
            focus: true
        });
</script>
 <div style="width:100%;margin:20px auto 40px;">
        <script type="text/plain" id="editor" style="width:100%;height:360px;"></script>
    </div>
';
if($gtype=="print")
{
  echo $code;
 }
 else
{
 return $code;
}
}

放个演示文件! 先下载mini版本 然后把里面的路径改一下就行了!

<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="keywords" content="UEditor,Editor,javascript 编辑器,html 编辑器,百度编辑器,百度 Editor, 在线编辑器"/>
    <meta name="description" content="UEditor是百度的一个javascript编辑器的开源项目,能带给您良好的富文本使用体验">
    <title>UEditorMINI</title>


    <link href="/include/umeditor/themes/default/css/umeditor.min.css" type="text/css" rel="stylesheet">
    <style type="text/css">
        .disabled {
            opacity: 0.5;
            cursor: default;
            *filter: alpha( opacity=50 );
        }
        .links a{
            color: #ff5400;
            margin-right: 5px;
        }
        .links a.green{
            color: green;
        }
    </style>

    <script src="/include/umeditor/third-party/jquery.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="/include/umeditor/umeditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="/include/umeditor/umeditor.min.js"></script>


</head>
<body>


    <div style="width:800px;margin:20px auto 40px;">
        <script type="text/plain" id="editor" style="width:100%;height:360px;"></script>
    </div>
  


<script type="text/javascript">
    var serverPath = '/serv/include/umeditor/',
        um = UM.getEditor('editor', {
            imageUrl:serverPath + "imageUp.php",
            imagePath:serverPath,
            lang:/^zh/.test(navigator.language || navigator.browserLanguage || navigator.userLanguage) ? 'zh-cn' : 'en',
            langPath:UMEDITOR_CONFIG.UMEDITOR_HOME_URL + "lang/",
            focus: true
        });
</script>
<div style="display:none">


</div>
</body>
</html>



写的好!

微信扫一扫赏大洋