pascal case custom html tag in Quill js

21 views Asked by At

I need to have a custom HTML tag in Quill js that is in Pascal case. But at the time of insertion, it becomes a lowercase.

for instance:

class MyCustomDataTag extends Embed {
  static create(param) {
    const node = super. Create(param)
    node.setAttribute('style', 'text-decoration: underline;background-color : lightblue;')
    node.setAttribute('field', param.value)
    node.innerHTML = param.text
    return node
  }
}

MyCustomDataTag.blotName = 'Data'
MyCustomDataTag.tagName = 'Data'
Quill.register({
  'formats/Data': MyCustomDataTag
})

In the example above, I need <Data></Data>, but I see <data></data>.

0

There are 0 answers