JSFiddle - React, Tailwind, and code Playground
by Shaunak Deshpande
JavaScript
<script src="~/Scripts/jquery-1.8.2.min.js"></script>
<h2>Index</h2>
<script src="//cdn.ckeditor.com/4.4.7/standard/ckeditor.js"></script>
@*<script src="//cdn.ckeditor.com/4.4.7/basic/ckeditor.js"></script>*@
<textarea name="editor1" id="editor1" rows="10" cols="80">
This is my textarea to be replaced with CKEditor.
</textarea>
<script>
// Replace the <textarea id="editor1"> with a CKEditor
// instance, using default configuration.
CKEDITOR.replace('editor1', {
removePlugins: 'specialchar,pastetext,pastefromword,stylescombo,about,anchor,clipboard',
/*toolbar: [
//{ name: 'links', items: ['Link', 'Unlink'] }
],*/
removeButtons: 'Anchor'
});
//HTML CKEDITOR.instances.editor1.getData()
$(document).ready(function () {
$('button').click(function () {
var htmldata = CKEDITOR.instances.editor1.getData();
console.log(htmldata);
$('#result').html(htmldata);
})
});
</script>
<button>Enter</button>
<div id="result"></div>