用svg的码农们肯定知道,在path、rect等元数据中会加入一些自定义属性,保存于数据库,但是用svg-edit编辑器时,

读取的时候,无法读取些这些自定义属性。解决办法:找sanitize.js文件,在该数组中svgWhiteList找到相关元素,在后

面添加你自己的自定义属性就好了。

"a": ["class", "clip-path", "clip-rule", "fill", "fill-opacity", "fill-rule", "filter", "id", "mask", "opacity", "stroke", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke-width", "style", "systemLanguage", "transform", "xlink:href", "xlink:title","自定义属性"],

 

相关文章:

  • 2022-12-23
  • 2021-11-25
  • 2021-10-23
  • 2022-12-23
  • 2021-08-11
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-23
  • 2022-12-23
  • 2021-12-20
  • 2022-12-23
  • 2021-07-24
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案