【发布时间】:2021-09-28 16:32:18
【问题描述】:
CKEditor 4 添加额外的 HTML 标记时遇到问题。我已经使用 v3 几年了,没有任何问题,并且我已经构建了自己的插件,所以我不是一个完整的新手,但这让我很难过。例如下面的 HTML 块:
<section class="component2">
<div class="">
<div class="component2__row">
<a class="component2__item component2__item--primary" href="#">
<img class="component2__item__image" src="http://MyServer/webmedia/Images/Components/component2/image-1.jpg" alt="IMG"/>
<h4 class="component2__item__title">Light Vehicle</h4>
</a>
</div>
</div>
</section>
保存为:
<section class="component2">
<div>
<div class="component2__row">
<a class="component2__item component2__item--primary" href="#">
<img alt="IMG" class="component2__item__image" src="http://MyServer/webmedia/Images/Components/component2/image-1.jpg" />
</a>
<h4 class="component2__item__title">
<a class="component2__item component2__item--primary" href="#">Light Vehicle</a>
</h4>
<a class="component2__item component2__item--primary" href="#"> </a>
</div>
</div>
</section>
有什么想法吗? (注意例如附加的锚标记!)HTML中有什么东西吗 它不喜欢?我可以使用 config.js 中的设置吗?
谢谢
【问题讨论】:
标签: html tags ckeditor config ckeditor4