1.0.0 • Published 3 months ago

boot-cell-editor v1.0.0

Weekly downloads
-
License
LGPL-3.0
Repository
-
Last release
3 months ago

BootCell HTML editor

Lightweight Rich Text Editor based on Edkit, WebCell & Bootstrap

NPM Dependency

NPM

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/bootstrap@5.3.3/dist/css/bootstrap.min.css"
    />
    <link
        rel="stylesheet"
        href="https://unpkg.com/bootstrap-icons@1.11.3/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}
            />
        );
    }
}