0
有人试过这个例子吗?受羊皮纸克隆培养基启发
https://quilljs.com/guides/cloning-medium-with-parchment
我在寻找什么
static formats(node)
用于一个答案。如果返回的
空|不确定|虚假
比似乎什么都没有受到影响。
有人试过这个例子吗?受羊皮纸克隆培养基启发
https://quilljs.com/guides/cloning-medium-with-parchment
我在寻找什么
static formats(node)
用于一个答案。如果返回的
空|不确定|虚假
比似乎什么都没有受到影响。
它返回由Blot表示的格式。例如,对于一个头它可能以这种方式实现:
formats(domNode) {
if (domNode.tagName === 'H1') return 1;
if (domNode.tagName === 'H2') return 2;
if (domNode.tagName === 'H3') return 3;
return null;
}
您可以在https://github.com/quilljs/parchment找到印迹的更多细节。另外,Quill如何实现它们的格式可能会有所帮助:https://github.com/quilljs/quill/tree/develop/formats。
谢谢你,我认为格式更像是一种验证。 +1 – user2135804