Suneditor: Keep the values ​​of the IDs of the HTML elements

Created on 15 Nov 2020  ·  3Comments  ·  Source: JiHong88/SunEditor

Hi:

Excellent editor. It would be convenient if the source code of the html property of the templates kept the values ​​of the IDs of the elements.

Thanks a lot,

Carlos Cuesta

question

All 3 comments

Hi,
You can use the attributesWhitelist option.

suneditor.create("", {
  attributesWhitelist: {
    "all": "id"  
  }
})

Hi:

Thank you very much for your prompt response and solution. Would the following be possible with data attributes?

attributesWhitelist: { "all": "data-*" }

A greeting

@cacuestai You can RegExp syntax.
ttributesWhitelist: { "all": "data-.+" }

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sirlancelot picture sirlancelot  ·  5Comments

ATOPBIO picture ATOPBIO  ·  7Comments

setesolutions picture setesolutions  ·  7Comments

chbin05 picture chbin05  ·  3Comments

BrianJVarley picture BrianJVarley  ·  3Comments