【发布时间】:2015-09-25 09:08:11
【问题描述】:
我目前正在为一个项目开发 ckeditor, 我们正在使用链接对话框插件。
正如标题中所说,我希望创建新链接,并在其末尾设置插入符号。 添加新链接后,默认行为会选择编辑器中的文本。
我一直在使用 link.js 插件
我想我找到了它发生的地方,但我无法在我的 a 标签结束后设置我的插入符号(它有时会工作=>它将插入符号放在最后,但经过一些尝试后它确实把它放在我的链接的开头)
以下是它的作用示例: 第一次:[a href="#"]我的链接[/a]^ 经过一些尝试:[a href="#"]我的链接[/a][a href="#"]我的链接[/a]^[a href="#"]我的链接[/a]
链接插件的onOk方法里面的代码:
//I've commented the line under to have no selection : it works
//range.select();
// According to the doc, this should do the job ??
range.moveToPosition(text, CKEDITOR.POSITION_AFTER_END);
感谢您的关注。
博士。
【问题讨论】:
标签: javascript html ckeditor rich-text-editor