Editor.js: Inline tools to block

Created on 25 Apr 2019  路  3Comments  路  Source: codex-team/editor.js

Add children for blocks. And can add opportunity convert inline tools in blocks?

<p>123<b>4</b>56<p>
now its look like a 
{
    type: "paragraph"
    data: {
        "text": "123<b>4</b>56"
    }
}
but i want convert to 

{
            "type" : "paragraph",
            "data" : {
                "text" : "123",
                "childrens": [
                   {
                     type:"bold",
                     text: "4"
                   }
                ]
            }
},
discussion feature viewed

Most helpful comment

For now, editorjs stores inline fragments inside the block鈥檚 data as HTML structures. The reason is simplifying render process. We are planning to add an option on how to store these fragments in output data: as inline-html, as markdown or as a JSON object

All 3 comments

Could you please explain your use case. For what purposes you want to use this structure? How you will render it?

Could you please explain your use case. For what purposes you want to use this structure? How you will render it?

I have component {text} with css modules classes and i want use him. Or maybe we can add support css modules?

For now, editorjs stores inline fragments inside the block鈥檚 data as HTML structures. The reason is simplifying render process. We are planning to add an option on how to store these fragments in output data: as inline-html, as markdown or as a JSON object

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Someskumarasamy picture Someskumarasamy  路  4Comments

guillaumepn picture guillaumepn  路  4Comments

neSpecc picture neSpecc  路  4Comments

natterstefan picture natterstefan  路  5Comments

llewellynthomas picture llewellynthomas  路  5Comments