百度编辑器Ueditor的简单调用

先去ueditou.baidu.com网站下载百度编辑器,放到项目根目录下的Data目录中,然后引入文件

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Document</title>
  <script>
    window.UEDITOR_HOME_URL='__ROOT__/Data/Ueditor/';
    window.onload=function(){
      window.UEDITOR_CONFIG.initialFrameHeight='400';//编辑器高度设置
      window.UEDITOR_CONFIG.initialFrameWidth='800';//编辑器宽度设置
      UE.getEditor('content');
    }
  </script>
  <js file='__ROOT__/Data/Ueditor/ueditor.config.js'/>
  <js file='__ROOT__/Data/Ueditor/ueditor.all.min.js'/>
</head>
<body>
<textarea name="editor" id="content" cols="30" rows="10"></textarea>
</body>
</html>

 效果图:

原文地址:https://www.cnblogs.com/hltswd/p/5118791.html