elditor-js
v1.1.7
Published
Simple text editor
Maintainers
Readme
elditor-js
simple text editor that uses Range and Selection. since execCommand is deprecated
Instalation
install via npm
npm install elditor-jsUsage
if you are using Nodejs/web bundlers
import { Elditor } from 'elditor-js';
new Elditor(document.getElementById('target'))if you are using cdn(iife)
<div id='target'></div>
<script https://unpkg.com/elditor-js/dist/elditor-js.iife.min.js></script>
<script>
new ElditorJs.Elditor(document.getElementById('target'));
</script>if you are using cdn(esm)
<script type="module">
import { Elditor } from 'https://esm.sh/elditor-js';
new Elditor(document.getElementById('target'));
</script> Getting Only the Functionality
<button>bold me</button> import { ElditorFunc } from 'elditor-js';
button.addEventListener('click', ElditorFunc.formatText('B'))Info
you may find some bugs on my text editor. hehe
