wordpress gutenberg:添加数据属性(data-id =“”)时,“核心/图像”的块验证失败。

问题描述 投票:0回答:1

数据属性(使用作为HTML编辑添加到锚标签时,出现古腾堡验证错误,当标签内的标签出现此问题。) >

[当用户添加图像并使用链接包装该图像时,onsubmit事件我们的插件会扫描帖子内容并添加data属性以链接,当刷新/重新打开帖子编辑页面时,控制台将显示gutenberg验证错误。

<figure class="wp-block-image size-large">
   <a href="http://affiliate.local/wp-admin/post.php?post=56662&amp;action=edit" data-lasso-id="123">
     <img src="http://affiliate.local/wp-content/uploads/2019/06/mint_2018_icon-toolbox-640x640.jpg" alt="" class="wp-image-51176"/>
   </a>
</figure>

enter image description hereenter image description here

在将数据属性(使用HTML编辑)添加到锚标签时,出现古腾堡验证错误,当图形标签中的锚标签出现此问题。当用户添加图像并包装时...

wordpress custom-data-attribute wordpress-gutenberg gutenberg-blocks
1个回答
0
投票

经过多次尝试和错误,我找到了解决方案。

© www.soinside.com 2019 - 2024. All rights reserved.