Closed sbehrends closed 7 years ago
innerHTML was bringing encoded entities, textContent works better :)
This way I got working HTML and CSS on same div 👍
<div id="demo-2"></div> <pre> <code class="liveCoding language-html" data-livecoding-id="demo-2" contenteditable><p>I'm a text</p> </code> </pre> <pre> <code class="liveCoding language-css" data-livecoding-id="demo-2" contenteditable>.p { color: red; } </code> </pre>
innerHTML was bringing encoded entities, textContent works better :)
This way I got working HTML and CSS on same div 👍