boot-cell-editor
v1.0.0-rc.4
Published
Lightweight Rich Text Editor based on TypeScript, WebCell & Bootstrap
Downloads
8
Maintainers
Readme
BootCell HTML editor
Lightweight Rich Text Editor based on Edkit, WebCell & Bootstrap
Demo
https://idea2app.github.io/Edkit/WebCell/
Tools
https://github.com/idea2app/Edkit#tools
Usage
Installation
Shell command
npm install web-cell boot-cell-editor
tsconfig.json
{
"compilerOptions": {
"target": "ES6",
"moduleResolution": "Node",
"useDefineForClassFields": true,
"jsx": "react-jsx",
"jsxImportSource": "dom-renderer"
}
}
HTML entry
<head>
<link
rel="stylesheet"
href="https://unpkg.com/[email protected]/dist/css/bootstrap.min.css"
/>
<link
rel="stylesheet"
href="https://unpkg.com/[email protected]/font/bootstrap-icons.css"
/>
</head>
Initialization
import { component } from 'web-cell';
import { Editor } from 'boot-cell-editor';
@component({ tagName: 'post-edit' })
export class PostEdit extends HTMLElement {
render() {
return (
<Editor
name="content"
defaultValue="<p>test</p>"
onChange={console.log}
/>
);
}
}