mind-elixir-core icon indicating copy to clipboard operation
mind-elixir-core copied to clipboard

Allow to embed video from other sites (YouTube, etc.)

Open jpdelmundo opened this issue 1 year ago • 2 comments

Is your feature request related to a problem? Please describe. It would be helpful to allow adding videos in a node like how adding image works right now.

Describe the solution you'd like Similar to adding an image to node using the URL, height, and width:

video?: {
    url: string
    width: number
    height: number
}

Describe alternatives you've considered No alternative (except for adding a URL as a data in a node menu plugin)

Additional context Add any other context or screenshots about the feature request here.

jpdelmundo avatar Sep 24 '24 05:09 jpdelmundo

Maybe you can try dangerouslySetInnerHTML

SSShooter avatar Sep 25 '24 05:09 SSShooter

Using dangerouslySetInnerHTML replaces the whole node. It removes the topic text (and tags, URL from the node menu).

Even if I still include the topic text in the new html, it can't be edited because editing is skipped in beginEdit if dangerouslySetInnerHTML has a value.

jpdelmundo avatar Sep 30 '24 02:09 jpdelmundo