editor-js / editor-js/image

access corresponding block from custom action

Open
#174 2 comments 0 reactions 0 assignees View on GitHub
good first issue
Dominant language
TypeScript
Stars
285
Forks
307
PR merge metrics
No merged PRs in 30d

Description

hi dear developers.

i want to create a custom action. in your first example i see somethings like this:

```
image: {
class: ImageTool,

config: {
actions: [
{
name: 'new_button',
icon: '',
title: 'title',
action: (name) => {
alert(`${name} `);
//access `corresponding` block ???
return false;
}
}
],
}

```

in this action you just used name and alert the name , i want to access block elements from this section and modify an image inside this block (and set width for image). how can i access block from this section?
thanks

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.