xheditor富文本编辑器菜单栏参数集合大全:

xheditor富文本编辑器菜单栏参数集合大全:

基础示例代码

<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title>BFW NEW PAGE</title>
    <script id="bfwone" data="dep=jquery.17&err=0" type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/bfwone.js"></script>
    <script type="text/javascript">
        bready(function() {
        use(["xheditor/xheditor"], function() {
        $('#ele').xheditor();
        });
        });
    </script>
</head>

<body>
    <textarea id="ele" style="width:400px; height:300px;"></textarea>
</body>

</html>

初始化参数示例代码:

$('#elm1').xheditor({tools:'full',skin:'default',showBlocktag:true,internalScript:false,internalStyle:false,width:300,height:200,loadCSS:'http://xheditor.com/test.css',fullscreen:true,sourceMode:true,forcePtag:true,upImgUrl:"upload.php",upImgExt:"jpg,jpeg,gif,png"});

初始化参数列表:

tools:自定义工具按钮

参数值:full(完全),mfull(多行完全),simple(简单),mini(迷你)

或者自定义字符串,例如:'Cut,Copy,Paste,Pastetext,|,Source,Fullscreen,About'

完整按钮表:

|:分隔符
/:强制换行
Cut:剪切
Copy:复制
Paste:粘贴
Pastetext:文本粘贴
Blocktag:段落标签
Fontface:字体
FontSize:字体大小
Bold:粗体
Italic:斜体
Underline:下划线
Strikethrough:中划线
FontColor:字体颜色
BackColor:字体背景色
SelectAll:全选
Removeformat:删除文字格式
Align:对齐
List:列表
Outdent:减少缩进
Indent:增加缩进
Link:超链接
Unlink:删除链接
Anchor:锚点
Img:图片
Flash:Flash动画
Media:Windows media player视频
Hr:插入水平线
Emot:表情
Table:表格
Source:切换源代码模式
Preview:预览当前代码
Print:打印
Fullscreen:切换全屏模式
About:关于xhEditor

skin:皮肤风格选择
参数值:default(默认风格),o2007blue(Office 2007 蓝色),o2007silver(Office 2007 银色),vista(Vista),nostyle(NoStyle)

layerShadow:阴影的深度(按钮面板和模式窗口的背景阴影)
参数值:0(不显示阴影),大于0的数值(显示阴影并设置阴影的深度)

clickCancelDialog:点击任意位置取消按钮面板功能
参数值:默认true(开启点击取消功能),false(关闭点击取消功能,必需要点击“取消”按钮才能关闭按钮面板)

showBlocktag:显示段落标签
参数值:true(显示段落标签),false(不显示)

linkTag:样式链接link标签保留状态
参数值:true(保留样式链接link标签),false(清理样式链接link标签)

internalScript:内部JS代码保留状态
参数值:true(保留内部JS代码),false(清理内部JS代码)

inlineScript:内联JS代码保留状态
参数值:true(保留内联JS代码),false(清理内联JS代码)

internalStyle:内部样式保留状态
参数值:true(保留内部样式),fa...

点击查看剩余70%

{{collectdata}}

网友评论