codex-team / codex-team/editor.js
Update method no updating the block
Open
- Dominant language
- TypeScript
- Stars
- 31.9k
- Forks
- 2.2k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
I am unable to update the Block via the `update` method.
method
```
update(id?: string, data?: BlockToolData): void
```
Example: I tried:
```
const blockToUpdate = {
type: 'paragraph',
data: {
text: 'Update Block'
}
};
const blockIndex = editor.blocks.getCurrentBlockIndex();
editor.blocks.update(blockIndex.toString(), blockToUpdate.data);
```
is `blockIndex` the right id I am passing to the update method?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.