This repository has been archived by the owner on Jan 20, 2022. It is now read-only.
Replies: 1 comment
-
Embeds can only be links – you'd also need a custom parser. I think at that point the best solution is probably to just create a new node type and pass that in through the extensions prop. You'd have to manually update the BlockMenu to include your custom node but other than that it should be plug-and-play.
I like this idea, would accept a PR :) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi again :~)
I've been digging around and I had a couple questions around the embeds. I think it'd be really great to be able to pass custom
toMarkdown
methods with the embed. For example, I'm outputting my markdown to be consumed asmdx
and I'd love to be able to control how the markdown for each embed is created.Additionally, I was wondering if it'd be possible to change the default way of inputting data for the embed. Currently when an embed action/command fires, it will replace the menu with a string input field. I'd love to be able to pass any react component to that view. An example of why I'd like this: I want to give the users the ability to embed more than 1 image in the editor. I could create an embed that has: a custom toMarkdown method, a
component
, and aconsumer
component which would ultimately output the props that thecomponent
would need, and would be passed to the underlyingattrs
object.Curious your thoughts @tommoor. Thanks again for this great library. I'd be happy to open some PRs if these ideas seem worthwhile (with some direction).
Beta Was this translation helpful? Give feedback.
All reactions