angular - 在 Angular 中,如何插入代替在CKeditor中按下回车时?
在CKeditor中按下回车时?
问题描述
我试过使用
config = {
height: 250,
enterMode: 'CKEDITOR.ENTER_DIV',
};
}
但这不起作用。它仍然在源代码中放置一个段落标签而不是 div 标签。
我在这里想念什么 -
https://stackblitz.com/edit/ckeditor-3efz3n?file=app%2Fapp.component.ts
解决方案
你不要把它当作一个没有意义的字符串来使用CKEDITOR.ENTER_DIV
。您应该从源代码中导入值或使用数字3
如果您想导入:
config = {
height: 250,
enterMode: CKEDITOR.ENTER_DIV, // It's a variable not a string like in the question
};
}
或者没有导入,您可以这样做将解决您的问题:
config = {
height: 250,
enterMode: 3
};
}
我3
在ckEditor 源代码中找到了这个数字。
推荐阅读
- c++ - 当我将 head 设置为 NULL 时,在链表末尾添加元素不会抛出输出
- java - spring boot如何转换mongodb的aggregation($convert)查询
- python - TypeError:'int'对象不可调用python3但没有round()或sum()函数
- jsf - PrimeFaces 不会使用 formB 的值更新 formA 的 inputtext
- c - 修补在 ELF 可执行文件或库中声明的函数的符号版本
- ios - 如何在 iOS Swift 上添加按钮并启用点击 UIContextMenu previewView?
- python-3.x - TypeError:不支持从 DecimalField 到 Decimal 的转换
- authentication - Ubuntu登录场景停止
- python - 狡猾的。如何在类中添加数据更改功能
- .net - 在具有 Entity Framework 依赖项的 .NET 5.0 项目中使用 .NET Framework 4.x 程序集