codex-team / codex-team/editor.js

Dynamic list of Tools

Open
#2,345 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
31.9k
Forks
2.2k
Avg merge
1d 1h
Merged PRs (30d)
1

Description

How can we provide a dynamic (not hard-coded) list of tools during Editor initialization?

The configuration object requires the Tool Class name be provided, with the Tool preloaded (so the class reference is valid):

```
tools: {
myOwnParagraph: MyParagraph
}
```

The `MyParagraph` tool needs to be preloaded before this object is constructed. There's no way to pass in a configuration, say from a decoded JSON string passed to the page, since `MyParagraph` would be a string, not a plain class name.

It would be _fantastic_ if the `tools` object could be in a JSON-friendly format so that we can pass a list of tools from the backend, unique to each editor instance.

Suggestions?

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.