TinyMCE:从单词粘贴时,表格单元格中没有段落

当我从Word粘贴复制的表时,我会得到一个表,其中带有段落标签,这会影响布局。我尝试使用有效的儿童选项删除<p>标记,但这似乎不起作用。

当我粘贴时,我会得到这个:

<table>
<tbody>
<tr>
<td>
<p><strong>Content</strong></p>
</td>

但是我想要这个:

<table>
<tbody>
<tr>
<td>
<strong>Content</strong>
</td>

设置:

selector: '#editor',min_height: 555,plugins: 'anchor autolink autoresize charmap code directionality fullscreen image imagetools link lists nonbreaking paste searchreplace table visualblocks visualchars',menubar: false,toolbar: 'undo redo | cut copy paste pastetext | formatselect | bold italic | alignleft aligncenter alignright | bullist numlist indent outdent | table anchor link image | removeformat charmap visualblocks searchreplace fullscreen code',block_formats: 'Paragraph=p;Heading 2=h2',language:  'nl',statusbar: false,anchor_top: false,anchor_bottom: false,paste_enable_default_filters: true,paste_word_valid_elements: "p,b,strong,i,em,u,h2,a[href],ol,ul,li,table,tr,td,th,tbody,thead",paste_retain_style_properties: "",verify_html: true,valid_children: "-td[p]",
chenmin1258 回答:TinyMCE:从单词粘贴时,表格单元格中没有段落

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3096185.html

大家都在问