Documentation / Settings

Data

Type: JSON

Default: false

This setting sets JSON as Redactor content.


Redactor('#entry', {
    data: {
        "version": "1.0.0",
        "time" : 1650860257872,
        "blocks": [
            {
                "type": "heading",
                "content": "...",
                "level": 1
            },
            {
                "type": "text",
                "content": "..."
            },
            {
                "type": "image",
                "src": "/path-to-image.jpg",
                "alt": "Alt text",
                "caption": "..."
            },
            {
                "type": "heading",
                "content": "...",
                "level": 2
            },
            {
                "type": "text",
                "content": "..."
            }
        ]
    }
});