美文网首页
simditor富文本编辑器的使用

simditor富文本编辑器的使用

作者: itcode | 来源:发表于2017-12-19 13:41 被阅读584次

下载地址:https://github.com/mycolorway/simditor/releases

1.引入CSS

<link rel="stylesheet" href="/static/plugins/editor/styles/simditor.css">

2.引入js

<script src="/static/plugins/editor/scripts/module.min.js"></script>
<script src="/static/plugins/editor/scripts/hotkeys.min.js"></script>
<script src="/static/plugins/editor/scripts/uploader.min.js"></script>
<script src="/static/plugins/editor/scripts/simditor.min.js"></script>

3.文本框div

<div class="form-group">
    <label>景区介绍</label>
    <textarea class="from-control" name="content" id="editor"  placeholder="正文从这里开始..."></textarea>
</div>

4.script函数

var editor = new Simditor({
        textarea: $('#editor'),
        upload : {
          url : '/file/upload',
          fileKey : 'file_key'
    }
});

相关文章

网友评论

      本文标题:simditor富文本编辑器的使用

      本文链接:https://www.haomeiwen.com/subject/qlslixtx.html