tiny-editor is a WYSIWYG rich text editor implemented with pure JavaScript and Font Awesome iconic font.
How to create a web editor using tiny-editor?
1.Install the tiny-editor
# NPM $ npm install tiny-editor --save
2.Import bundle.js in html
<script src="/dist/bundle.js"></script>
3.Import Font Awesome
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
4.Create a div container and add data-tiny-editor attribute for it. tiny-editor will be displayed in this div
<div data-tiny-editor> <p> Default Text Here </p> </div>
5.You can use data attribute to set tiny-editor
<div data-tiny-editor data-bold="no" data-formatblock="no" data-italic="no" data-underline="no" data-fontname="no" data-forecolor="no" data-justifyleft="no" data-justifycenter="no" data-justifyright="no" data-insertorderedlist="no" data-insertunorderedlist="no" data-outdent="no" data-indent="no" data-remove-format="no"> <p> Default Text Here </p> </div>