Section Menu:  

Ueditor富文本编辑器

  • 发布时间: 2020-07-17 15:15
  •    阅读: 2438   

富文本编辑器功能示例

参数
    dir [str] :富文本编辑器上传文件路径
    host [str]: 默认
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
   <meta charset="utf-8">
   <title>Ueditor 编辑器调用示例</title><!-- 注意 dir 参数为 "upload/" 下面的一个目录名 -->
   <script src="{{ kg['server']['HTTP_HOST'] }}/tools/ueditor/ueditor.config.js?dir=other&host={{ kg['server']['HTTP_HOST'] }}"></script>
   <script src="{{ kg['server']['HTTP_HOST'] }}/tools/ueditor/ueditor.all.js"></script>
</head>

<body>
   <form action="environ" method="post" target="_blank">
      <textarea id="KgcmsEditor" name="KgcmsEditor" style="width:{{ kg['globals']['editor_size'][0] }}px; height:{{ kg['globals']['editor_size'][1] }}px;">{{ data['content'] }}</textarea>
      <script>
      UE.getEditor('KgcmsEditor')
      </script>
      <br />
      <input type="submit" value="提交数据" style="padding:5px 15px;" />
   </form>
</body>
</html>
适应版本

v1.0.1