首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Kendo Angular Editor setHTML:在特定位置或光标后插入HTML内容

Kendo Angular Editor setHTML:在特定位置或光标后插入HTML内容
EN

Stack Overflow用户
提问于 2020-06-22 17:06:40
回答 1查看 406关注 0票数 1

可用的命令setHTML将替换现有内容。有没有办法在特定位置插入超文本标记语言内容作为insertText

EN

Stack Overflow用户

发布于 2020-06-23 19:20:48

经过长时间的研究,我发现目前还没有内置的方法来完成这项工作。但是,在Telerik论坛上提供了一种解决方法。

论坛链接:insert-html-content-to-editor

Example

代码语言:javascript
复制
public insertHTML(editor: EditorComponent) {
editor.exec('insertText', { text: '#CURSOR#' });
// Replace cursor placeholder with new HTML and set the new editor value.
editor.value = editor.value.replace(/#CURSOR#/, this.strResult);
}
票数 1
EN
查看全部 1 条回答
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/62510915

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档