Files
divkit/visual-editor
4eb0da 481d434db0 0.4.7 changelog
commit_hash:a14196b32e7e4dea5330a9ee703c1af983611a92
2025-03-31 13:40:32 +03:00
..
2025-03-28 15:47:08 +03:00
2024-09-09 17:23:57 +03:00
2024-09-09 17:23:57 +03:00
2024-09-09 17:23:57 +03:00
2025-03-31 13:40:32 +03:00
2024-09-09 17:23:57 +03:00
2025-02-17 17:57:20 +03:00
2025-03-31 13:40:32 +03:00
2024-09-09 17:23:57 +03:00
2024-09-09 17:23:57 +03:00
2024-09-09 17:23:57 +03:00
2024-09-09 17:23:57 +03:00
2024-09-09 17:23:57 +03:00
2024-09-09 17:23:57 +03:00
2024-09-09 23:52:31 +03:00

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();