I am developing a crud application in nodejs using handlebars templating engine. Now I want to add editor like ckeditor or any similar kind of editor in my application.
1 Answer
CKEditior is a front-end plug-in that runs directly in the browser you use it like any other front-end js plugin here is an example
<div class="entry">
<script src="https://cdn.ckeditor.com/4.9.1/standard/ckeditor.js"></script>
<h1>{{title}}</h1>
<div class="body">
<textarea name="editor1"></textarea>
<script>
CKEDITOR.replace( 'editor1' );
</script>
{{body}}
</div>
</div>
in the json:
{
title: "My New Post",
body: "This is my first post!"
}
you can try it here: tryhandlebar
-
1For CKEditor 5 use:
<script src="https://cdn.ckeditor.com/ckeditor5/12.4.0/classic/ckeditor.js"></script>
Commented Oct 20, 2019 at 3:46 -