JSFiddle - React, Tailwind, and code Playground
by oleq
HTML
<script src="http://cdnjs.cloudflare.com/ajax/libs/ckeditor/4.2/ckeditor.js"></script>
<textarea id="editor">Hello <img src="http://jsfiddle.net/img/logo.png" /></textarea>
JavaScript
CKEDITOR.addCss( 'body{ background: #ccc }' );
CKEDITOR.replace( 'editor', {
plugins: 'wysiwygarea,toolbar,sourcearea,image,basicstyles',
on: {
instanceReady: function() {
this.dataProcessor.htmlFilter.addRules( {
elements: {
img: function( el ) {
if ( !el.attributes.alt )
el.attributes.alt = 'An image';
}
}
} );
}
}
} );