码迷,mamicode.com
首页 > 其他好文 > 详细

ueditor的简单用法

时间:2018-05-15 12:42:09      阅读:244      评论:0      收藏:0      [点我收藏+]

标签:截图   link   com   get   python   bubuko   ima   asc   ati   

 

先粘贴未使用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的简单用法

标签:截图   link   com   get   python   bubuko   ima   asc   ati   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!