0

I just tried to use code like below:

<editor init-text="String "Test""></editor>

But DOM breaks because of qoutes in given string.

How to avoid that problem?

omnomah
  • 95
  • 2
  • 8
  • 4
    Possible duplicate of [Javascript Escape Double Quotes](https://stackoverflow.com/questions/24559625/javascript-escape-double-quotes) – oniondomes Feb 21 '18 at 00:22

1 Answers1

0

Escape the quotes with a \

<editor init-text="String \"Test\""></editor>

Or mix single ' and double " quotes

<editor init-text='String "Test"'></editor>
zero298
  • 25,467
  • 10
  • 75
  • 100
  • 1
    Single qoutes can help untill i face with single qoutes in a string too. That's not working for me. Only " entity works. – omnomah Feb 20 '18 at 16:08
  • Or you can declare a string with tick quotes in `data()` and use `:init-text`. I.e. in template: ``. In ` – thibautg Feb 20 '18 at 18:00