Hello I have a stupid question... about ckeditor 5 (in javascript). I can't generate html as output. I have some kind of code that replaces tags with ## , # or *
Do you know how to configure the option when creating the editor?
<div class="form-group{% if property.required %} required{% endif %}">
<label for="{{ property.name }}" class="col-sm-2 control-label">{{ property.description }}</label>
<div class="col-sm-10">
<textarea class="form-control" rows="4" id="{{ property.name }}" name="{{ property.name }}" placeholder="{{ property.description }}">
{{ bean[property.name] }}</textarea>
</div>
</div>
ClassicEditor
.create( document. querySelector( '#{{ property.name }}' ), {
licenseKey: '',
autosave: {
save(editor) {
console.log(editor.getData());
}
}
} )
.then(editor => {
window. editor = editor;
})
.catch(error => {
console. error('Oops, something went wrong!');
console.error( 'Please, report the following error on https://github.com/ckeditor/ckeditor5/issues with the build id and the error stack trace:' );
console.warn('Build id: micsp245aaqe-k0zg3p5a2flq');
console. error( error );
} );
As you can see my editor.getData() returns me
# Hello
World
instead of
<h1>Hello</h1>
<p>world<p>