自定义属性“data-ccp-props”

问题描述 投票:0回答:2
html attributes
2个回答
0
投票

阅读 https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/data-*

data-*
全局属性形成一类称为自定义数据属性的属性,它允许通过脚本在 HTML 及其 DOM 表示之间交换专有信息。

因此,这些是网站作者给出的自定义属性,问题在于您的编辑器以及它如何处理它们(或未能这样做)。它们在 html 中没有任何问题。

如果它们设置正确(如正确的 HTML ),并且我在您的示例代码中没有看到任何问题,您的编辑器应该能够处理它们。


0
投票

这是一个老问题,但为了从 Google 登陆这里的任何人的利益 - 当复制 Word 文档、Office 365 等并复制到支持粘贴此类内容的编辑器(例如 WYSIWYG HTML web)时,会发生这种 HTML编辑)

来自 Word 文档复制和粘贴的一些示例内容:

<div class="SCXW251995521 BCX8" style="-webkit-user-drag: none; -webkit-tap-highlight-color: transparent; margin: 0px; padding: 0px; user-select: text; font-family: 'Segoe UI', 'Segoe UI Web', Arial, Verdana, sans-serif; font-size: 12px; background-color: #ffffff;">
<div class="OutlineElement Ltr SCXW251995521 BCX8" style="-webkit-user-drag: none; -webkit-tap-highlight-color: transparent; margin: 0px; padding: 0px; user-select: text; clear: both; cursor: text; overflow: visible; position: relative; direction: ltr;">
<span class="TextRun SCXW158155000 BCX8" lang="FR-CA" style="-webkit-user-drag: none; -webkit-tap-highlight-color: transparent; margin: 0px; padding: 0px; user-select: text; font-style: normal; font-size: 20pt; line-height: 32px;" xml:lang="FR-CA" data-contrast="auto"><span class="NormalTextRun SCXW158155000 BCX8" style="-webkit-user-drag: none; -webkit-tap-highlight-color: transparent; margin: 0px; padding: 0px; user-select: text;" data-ccp-parastyle="Title">
© www.soinside.com 2019 - 2024. All rights reserved.