wordpress ueditor编辑器的使用
来源:互联网 发布:惊天动地影评知乎 编辑:程序博客网 时间:2024/06/05 23:01
wordpress系统默认的编辑器功能不太完善,就改用百度编辑器ueditor插件。
要在其他页面上调用这个编辑器,就在当页加上ueditor相关的js和css。
<script charset="utf-8" src="<?php home_url();?>/wp-content/plugins/wp-ueditor2/ueditor/editor_config.js"></script><script charset="utf-8" src="<?php home_url();?>/wp-content/plugins/wp-ueditor2/ueditor/editor_all.js"></script><link rel="stylesheet" type="text/css" href="<?php home_url();?>/wp-content/plugins/wp-ueditor2/ueditor/themes/default/ueditor.css"/>
调用:
<pre name="code" class="javascript"><script type="text/javascript">var editor_a = new baidu.editor.ui.Editor({initialFrameWidth:660,initialFrameHeight:250});editor_a.render('info_content');</script>
<textarea name="info_content" id="info_content" style="width:660px;font-size:12px;margin-top: 5px;overflow: scroll-y;"></textarea>
获取内容:getContent();
设置内容:setContent();
//获取编辑器内容var content = editor_a.getContent();
编辑器会自动将<div>转成<p>,解决:
在ueditor.all.js里大约在9305行,'allowDivTransToP' : true 改为 false:
me.setOpt({ 'allowDivTransToP':false, 'disabledTableInTable':true });
在9399行有个case ' div '全部注释掉。。
禁止编辑器高度自适应:
在ueditor.config.js里:
//是否可以拉伸长高,默认true(当开启时,自动长高失效) ,scaleEnabled:true
,initialFrameWidth:1081 //初始化编辑器宽度,默认1000 ,initialFrameHeight:320 //初始化编辑器高度,默认320
0 0
- wordpress ueditor编辑器的使用
- Ueditor编辑器的使用
- UEditor编辑器的使用
- ueditor编辑器的使用
- ueditor编辑器的使用
- ueditor编辑器的使用
- 百度编辑器ueditor的使用
- ueditor编辑器的初次使用
- HTML编辑器UEditor的简单使用
- 百度编辑器ueditor的简单使用
- 百度编辑器ueditor的简单使用
- Ueditor(百度编辑器)的使用
- HTML编辑器UEditor的简单使用
- 百度编辑器ueditor的简单使用
- 百度编辑器ueditor的简单使用
- 富文本web编辑器--ueditor的使用
- 百度在线编辑器ueditor的使用
- 百度富文本编辑器Ueditor的使用
- 报错:loaded the "" nib but didn't get a UITableView
- Server.Transfer和AjaxPro不兼容问题
- 14-ARC自动引用内存使用及管理机制
- android中jsoup解析html的几个例子
- jqGrid学习
- wordpress ueditor编辑器的使用
- maven资料
- hdu---1722 Cake
- MySQL几点重要的性能指标计算和优化
- 【微软100题】002设计包含 min 函数的栈
- 文件was built
- Lambda 表达式的简介及形成过程
- ZOJ 3844 Easy Task
- 80使用相机录像