ckeditor 自动以我无法完全看到模式的方式重新格式化我的文本
ckeditor 自动以一种我无法完全看到模式的方式重新格式化我的文本。
下面是我通过源代码视图插入编辑器中的原始 html 代码。如果订单行,它应该迭代一个列表。 用户可以编辑自己的邮件模板,这些模板保存在数据库中,并通过代码周围的其他位置的 freemarker 检索和填充数据。这个问题在某种程度上与这个问题相关: ckeditor 转义所有文本- 我怎样才能阻止它这样做
好吧,这是我在 ckeditor 的源视图部分输入的文本:
<p>Hei customer with name ${Customer.name}</p>
<table>
<tr>
<th>Antall</th>
<th>Kasse</th>
<th>Leveringsdat</th>
<th>Hyppighet</th>
<th>Leveringsstart</th>
<th>Pris ordrelinje</th>
</tr>
<#list Order.orderLines as ol>
<tr>
<td>${ol.number}</td>
<td>${ol.box.name}</td>
<td>${Order.weekday}</td>
<td>${Order.frequence}</td>
<td>${Order.startdate}</td>
<td>Pris senere</td>
</tr>
</#list>
</table>
当我更改视图时再次将“source”更改为“html”,然后再返回,编辑器已将代码转换为:
<p>
Hei customer with name ${Customer.name}</p>
<p>
<#list Order.orderLines as ol> </#list></p>
<table>
<tbody>
<tr>
<th>
Antall</th>
<th>
Kasse</th>
<th>
Leveringsdat</th>
<th>
Hyppighet</th>
<th>
Leveringsstart</th>
<th>
Pris ordrelinje</th>
</tr>
<tr>
<td>
${ol.number}</td>
<td>
${ol.box.name}</td>
<td>
${Order.weekday}</td>
<td>
${Order.frequence}</td>
<td>
${Order.startdate}</td>
<td>
Pris senere</td>
</tr>
</tbody>
</table>
它已移动这部分“<#list Order.orderLines as ol> ”离开表格并位于 HTML 顶部。我可以理解编辑器试图变得聪明并看到“啊哈,这不是有效的 html,我将操纵它并正确执行它”,所以我有两个问题:
1)是否可以以某种方式配置编辑器应该未操作 html Iv 输入 2)任何人都有一个很好的链接,文档准确描述了当编辑器进行这些操作时应用哪些规则?
ckeditor automatically reformats my text in a way where I dont fully see the pattern
Below is the raw html code I insert in the editor through the source view. It should iterate an list if orderlines.
The users can edit their own mail templates, which are persisted in database and retrieved and populated with data through freemarker other places around the code. This question is somehow related to this one:
ckeditor escapes all text - how can I prevent it from doing so
okay, so this is the text I enter i the source view part of the ckeditor:
<p>Hei customer with name ${Customer.name}</p>
<table>
<tr>
<th>Antall</th>
<th>Kasse</th>
<th>Leveringsdat</th>
<th>Hyppighet</th>
<th>Leveringsstart</th>
<th>Pris ordrelinje</th>
</tr>
<#list Order.orderLines as ol>
<tr>
<td>${ol.number}</td>
<td>${ol.box.name}</td>
<td>${Order.weekday}</td>
<td>${Order.frequence}</td>
<td>${Order.startdate}</td>
<td>Pris senere</td>
</tr>
</#list>
</table>
And when I change the view from "source" to "html" again, and then back, the editor has transformed the code to this:
<p>
Hei customer with name ${Customer.name}</p>
<p>
<#list Order.orderLines as ol> </#list></p>
<table>
<tbody>
<tr>
<th>
Antall</th>
<th>
Kasse</th>
<th>
Leveringsdat</th>
<th>
Hyppighet</th>
<th>
Leveringsstart</th>
<th>
Pris ordrelinje</th>
</tr>
<tr>
<td>
${ol.number}</td>
<td>
${ol.box.name}</td>
<td>
${Order.weekday}</td>
<td>
${Order.frequence}</td>
<td>
${Order.startdate}</td>
<td>
Pris senere</td>
</tr>
</tbody>
</table>
It has moved this part "<#list Order.orderLines as ol> </#list>" out of the table and up on the top of the HTML. I can understand that the editor somehow tries to be smart and see "aha, that is not valid html, I will manipulate it and do it correct", so I have two questions:
1) is it possible to configure somehow that the editor should not manipulated html Iv entered
2) anyone has a good link a documentation describe exactly which rules are applied when the editor those these kind of manipulation?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论