Files
divkit/visual-editor
4eb0da 6c69459518 Text edit fixes
commit_hash:703b43783e6521442359db0d40cc5d662d003710
2025-02-17 17:57:20 +03:00
..
2025-02-17 17:57:20 +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-12-23 15:10:25 +03:00
2024-09-09 17:23:57 +03:00
2025-02-17 17:57:20 +03:00
2025-02-17 17:57:20 +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();