JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://cdnjs.cloudflare.com/ajax/libs/ckeditor/4.0.1/ckeditor.js"></script>
<p>
Steps to reproduce:<br />
- Place cursor into editor<br />
- Click bullets<br />
- Type Command-I (to italicize)<br />
- Type some text<br />
- Hit enter twice to exit from unordered list<br />
- Type some more text<br />
- Click submit (to trigger the getData function and render content<br />
- Inspect the rendered HTML content. Notice special character &#8203; being put into the content
</p>
<textarea name="test"></textarea><br />
<input type="button" id="submit" name="submit" value="submit" />
<div id="render"></div>
JavaScript
$(document).ready(function() {
CKEDITOR.replace('test');
$('#submit').on('click', function() {
var content = CKEDITOR.instances.test.getData();
$('#render').html(content);
});
});