angkeeditor

2.0.6 • Public • Published

#简介 昂克定制化富文本编辑器


##部署步骤

main.js 中 import angkeeditor from 'angkeeditor';
Vue.use(angkeeditor);
项目中引入editor标签
<angkeeditor id="editor_id" height="500px" width="1500px" :option="option"ref="editor">
其中id,height,width为必填
option={
uploadJson:'/uploadimg',//上传地址
fileReadUrl:'/read/'//读取文件的地址
templateUrl:"",//模板路径
saveTemplateUrl:"" //保存模板路径
delTemplateUrl:"" //删除模板接口
templateCode:"" //模板分类码
}


##api接口

$refs['编辑器ref'].setHtml(html :string) :
设置当前编辑器中的html
$refs['编辑器ref'].setTxt(txt :html) :
设置当前编辑器中的txt
$refs['编辑器ref'].clearContext() :
清空当前编辑器中的html
$refs['编辑器ref'].getHTML() :
获取当前编辑器中的html
$refs['编辑器ref'].getTXT() :
获取当前编辑器中的txt
$refs['编辑器ref'].isEmpty() :
判断当前编辑器中是否有内容
$refs['编辑器ref'].getSelectedHtml() :
获取当前编辑器选中的html

/angkeeditor/

    Package Sidebar

    Install

    npm i angkeeditor

    Weekly Downloads

    1

    Version

    2.0.6

    License

    ISC

    Unpacked Size

    1.18 MB

    Total Files

    202

    Last publish

    Collaborators

    • harrycrss