editor-js / editor-js/embed

How to insert() embed programmatically?

Open
#16 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
159
Forks
105
PR merge metrics
No merged PRs in 30d

Description

For example, imagine typing the `source` URL in a text input, then feeding it to the `insert()` method:

```js
editor.blocks.insert('embed', {source: url}, {}, index, true)
```

Of course, that won't work because the `service` and `embed` URL have not been set.

How can you insert an embed block based just on the `source` URL, without parsing the `service` and `embed` URL yourself?

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.