1

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 1

3

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

2
  • 1
    For CKEditor 5 use: <script src="https://cdn.ckeditor.com/ckeditor5/12.4.0/classic/ckeditor.js"></script> Commented Oct 20, 2019 at 3:46
  • is there any way to require() it
    – arunwebber
    Commented Jan 29, 2021 at 9:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.