@likhaeditor/likhaeditor
v0.0.2
Published
Vanilla JavaScript wrapper for Likha editor - works without build tools
Maintainers
Readme
@likhaeditor/likhaeditor
Vanilla JavaScript wrapper for Likha editor - works without build tools.
Installation
npm
npm install @likhaeditor/likhaeditorCDN
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@likhaeditor/likhaeditor/dist/likha-editor.css">
<script src="https://cdn.jsdelivr.net/npm/@likhaeditor/likhaeditor/dist/likha-editor.umd.js"></script>Usage
ES Module
import { createEditor } from '@likhaeditor/likhaeditor';
import '@likhaeditor/likhaeditor/dist/likha-editor.css';
createEditor({
element: '#editor',
content: '<p>Start writing...</p>'
});CDN (Browser)
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@likhaeditor/likhaeditor/dist/likha-editor.css">
</head>
<body>
<div id="editor"></div>
<script src="https://cdn.jsdelivr.net/npm/@likhaeditor/likhaeditor/dist/likha-editor.umd.js"></script>
<script>
const { createEditor } = LikhaEditor;
createEditor({
element: document.getElementById('editor'),
content: '<p>Hello, Likha!</p>'
});
</script>
</body>
</html>Features
- No build tools required
- Full toolbar with all formatting options
- Customizable toolbar buttons
- Works in all modern browsers
- TypeScript support
Custom Toolbar
createEditor({
element: '#editor',
toolbarButtons: [
'heading',
'bold',
'italic',
'link',
'bulletList',
'orderedList'
]
});Documentation
Full documentation: https://likhaeditor.netlify.app/
Getting Started: https://likhaeditor.netlify.app/guide/getting-started
API Reference: https://likhaeditor.netlify.app/api/html
License
MIT © Shiv Singh
