默认模式
自定义按钮
皮肤选择
其它选项
API交互
非utf-8编码调用
UBB可视化
Ajax上传
插件扩展
iframe调用上传
异步加载
生成代码
xhEditor demo5 : Javascript API交互
<p>当前实例调用的Javascript源代码为:</p><p>var editor;<br />editor=$('#elm1').xheditor();//方式1<br />editor=$('#elm1')[0].xheditor;//方式2<br />editor.pasteHTML('<strong>粘贴的内容</strong>');</p><p><br />注:本页面演示大部分外部调用的API接口,更多详细帮助信息请查看:<a href="http://code.google.com/p/xheditor/wiki/Help">http://code.google.com/p/xheditor/wiki/Help</a></p>
focus();
|
setSource('<p>aaa1</p>');
|
$('#elm1').val('<p>aaa2</p>');
|
getSource();
|
$('#elm1').val();
|
appendHTML('<strong>添加在尾部</strong>');
|
getSelect();
|
getSelect('text');
|
pasteHTML('<strong>粘贴的内容</strong>');
|
pasteText('<strong>粘贴的内容</strong>');
|
formatXHTML('<b>abc</b>');
|
toggleSource();
|
toggleSource(true);
|
toggleFullscreen(true);
|
toggleShowBlocktag();
|
alert(settings.upLinkExt)