首页 > 其他 > 详细

ueditor的简单用法

时间:2018-05-15 12:34:26      阅读:218      评论:0      收藏:0      [点我收藏+]

 

先粘贴未使用ueditor之前的代码:

<body>

<label for="input_content">作答区:</label>

<textarea id="input_content"></textarea>
</body>
运行效果:

技术分享图片

很难看是不是?

使用ueditor后的代码:

<head>

<script type="text/javascript" src="{{ url_for(‘static‘,filename=‘ueditor/ueditor.config.js‘)}}"></script>
<script type="text/javascript" src="{{ url_for(‘static‘,filename=‘ueditor/ueditor.all.js‘)}}"></script>

</head>

<body>

<label for="input_content">作答区:</label>

<textarea id="input_content"></textarea>

<script type="text/javascript">
var ue = UE.getEditor(‘input_content‘, {
toolbars: [
[‘fullscreen‘, ‘emotion‘,‘InsertImage‘, ‘preview‘, ‘link‘]
],
initialFrameWidth: "100%",
initialFrameHeight: "100",
});
</script>
</body>
运行后效果:

技术分享图片

导入的包截图:

技术分享图片

当然你也可以将ueditor所有的包全都导入static目录下也行。

 

本人在python下测试的,其它的语言,只是导入文件的方式有一些区别,其它没区别。

 


 

ueditor的简单用法

原文:https://www.cnblogs.com/jipinglong/p/9040356.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!