ame*_*exn 7 javascript css asp.net asp.net-mvc ckeditor
我在我的Asp.net MVC 3应用程序中使用CKEditor ver.3.6.
我的要求是在Google doc中创建Paint格式选项.我需要在ckeditor中实现Paint格式选项.
在Ckeditor中如何从所选文本(源)到新选择的文本(目标)复制/获取所有格式,如字体,字体效果,居中段落对齐.
请提出正确的解决方案.
使用此功能可将选定 html 的内容替换为一个字段中的文本。单击按钮时,调用此函数:
function Replace()
{
var sel = editor.getSelection();
var ele=sel.getStartElement();
if(ele.hasAttributes())
{
var insertele= editor.document.createElement('span');
ele.copyAttributes(insertele,{type:1,value:1})
insertele.setHtml($("#repTxt").val());
editor.insertElement(insertele);
}
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1029 次 |
| 最近记录: |