CKEditor - 自定义单词或短语插入功能

CKEditor - Custom word or phrase insertion function

我正在使用 CKEditor 以便用户可以轻松输入文本。他还必须输入variables/tags,之后系统会像{foo}一样填写。为了防止由小错别字引起的错误报告,我想提供一个下拉列表以将其插入文本中。我怎样才能做到这一点?

我发现了一个名为 StrInsert 的很有前途的插件,但它不受较新的 CKEditor 版本的支持,而且看起来维护得不好。还有其他已知的插件吗?

我最终使用占位符插件作为 described here。我只是使用占位符格式 [[foo]] 代替或原始格式。如果你像我一样使用 nuget 包,你必须下载以下插件并将它们复制到插件文件夹中:placeholderwidgetlineutils。将插件添加到您的 CKEditor 配置中:extraPlugins: 'placeholder'

编辑1: 您也可以使用 this custom plugin