editor-js / editor-js/paragraph

A way to add custom components as part of the paragraph content

Open
#96 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
59
Forks
129
PR merge metrics
No merged PRs in 30d

Description

Is there a way to embed custom components inline as part of paragraph?
Lets say I want to build a document picker, which should show a link inside the paragraph text. The document picker does not work on text input, meaning that I should not select any text in order to embed something. For example, my component will show a modal where I pick the document and then on database I would like to store just the document id, and next time paragraph renders, it should render my custom component inline, where I can create the link on runtime with the id received from database.

Is this doable?

I can ofc use a custom block tool, but this would show the entry into a new line, which is not what I want.

How do I imagine this to work?

Paragraph should open the toolbox menu when I press slash in any position, and from there I should be able to pick which custom tool to render, and that should render inline, not in new line.

As an example loop from Microsoft works this way, where I can put inline stuff inside a paragraph.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.