@divkitframework/visual-editor
TypeScript icon, indicating that this package has built-in type declarations

0.4.4 • Public • Published

DivKit Visual Editor

Install

npm i @divkitframework/visual-editor

Render editor

import '@divkitframework/visual-editor/dist/divkit-editor.css';
import { DivProEditor } from '@divkitframework/visual-editor';

const instance = DivProEditor.init({
    renderTo: document.body,
    value: JSON.stringify({
        "card": {
            "log_id": "test",
            "states": [{
                "state_id": 0,
                "div": {
                    "type": "container",
                    "orientation": "overlap",
                    "items": [{
                        "type": "text",
                        "text": "Hello world"
                    }]
                }
            }]
        }
    })
});

// ...

instance.getValue();

Dependencies (0)

    Dev Dependencies (26)

    Package Sidebar

    Install

    npm i @divkitframework/visual-editor

    Weekly Downloads

    79

    Version

    0.4.4

    License

    Apache-2.0

    Unpacked Size

    2.06 MB

    Total Files

    8

    Last publish

    Collaborators

    • robot-divkit