百度编辑器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>

效果图:

百度编辑器Ueditor的简单调用

上一篇:vue 快速入门 系列 —— 侦测数据的变化 - [vue 源码分析]


下一篇:做IT这几年,我整理了这些干货想要送给你!