Nested blocks, for extracting links💡
See original GitHub issueThis looks like an amazing tool! We are investigating removing our TinyMCE editor from our CMS and are interested in using your project.
If our editors add links to resources on the web, we would like to be able to identify if these items still exist or if they are redirecting, so we can update/remove the links. Currently, with TinyMCE, this is really difficult.
I love the way the data is presented and would be amazing for us, but I was wondering if you can or plan to have nested blocks? Or if it’s already supported. If an editor adds an inline link into a paragraph, is it possible to have this as a nested block?
Currently this is how your editor outputs a paragraph:
{
"type" : "paragraph",
"data" : {
"text" : "There are dozens of <a href=\"https://github.com/editor-js\">ready-to-use Blocks</a> and the <a href=\"https://editorjs.io/creating-a-block-tool\">simple API</a> for creation any Block you need. For example, you can implement Blocks for Tweets, Instagram posts, surveys and polls, CTA-buttons and even games."
}
},
Possible future:
{
"type": "paragraph",
"data": [
{
"text": "There are dozens of "
},
{
"link": {
"url": "https://github.com/editor-js",
"text": "ready-to-use Blocks"
}
}
{
"text": " and the "
},
{
"link": {
"url": "https://editorjs.io/creating-a-block-tool",
"text": "simple API"
}
},
{
"text": " for creation any Block you need. For example, you can implement Blocks for Tweets, Instagram posts, surveys and polls, CTA-buttons and even games."
}
]
}
Looks like the paragraph tool is a plugin so we would be able to write and share our own version, but would this allow us to create our own custom data? And would this be something you are interested in supporting?
Thanks for your time.
And again this is an amazing project!
Issue Analytics
- State:
- Created 3 years ago
- Reactions:16
- Comments:7 (2 by maintainers)
I think my issue is related to this / could be fixed with the proposed solution: When you press Shift + Enter while editing a paragraph, an
<br>
is added. I would expect just a new-line\n
. or with the proposed structure:Yes, its a lot of data, but:
The Quote from the base-concepts page:
Same here. Looking forward for nested block.