codex-team / codex-team/editor.js
title() of inline tool static?
Open
- Dominant language
- TypeScript
- Stars
- 31.9k
- Forks
- 2.2k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
Within the docs it says that the [title()](https://editorjs.io/inline-tools-api-1/#title) method for an inline tool should be static. However, it furtunately does not need to bedefined as such, as I would not otherwise be able to use the i18n api (see example below).
Would be good to fix this in the docs.
```js
export default class myTool {
get title() {
return this.api.i18n.t("my tool");
}
constructor({api}) {
this.api = api;
}
//...
}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.