【发布时间】:2021-12-06 12:04:50
【问题描述】:
我正在使用 Tinymce 5.9.1 和 template 插件。
我用特殊的 css 代码制作了一个像这样的代码的新模板:
templates: [
{title: 'green-box', description: 'box tiny green', content: '<div class="tiny-green-box"> Content </div><div class="p-1"></div></br>'},],
在一行中编辑内容时有效。当我想放多行时出现问题。
Tinymce 为每个新行复制模板。
例如,如果我键入 line1 并按 ENTER,它将创建新的 div,结果将是这样的:
你可以在 html 代码中看到它重复了很多次:
【问题讨论】:
标签: tinymce tinymce-4 tinymce-5 tinymce-plugins