How to add and render a custom button content as a React component?
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 406
- Forks
- 131
- Avg merge
- 2h 32m
- Merged PRs (30d)
- 2
Description
Hi 👍
I wonder if there is any way to add a custom button to the toolbox and render a custom React component when clicking on the new button.
I know there is an option to add a custom button, but the button context should be written as String, not as a React component.
the current solution for me is :
controls: {
info: {
name: 'info',
popup: function (editor) {
return (`
<div>
Text
</div>
`);
}
}
},
extraButtons: [
'info'
],
And I want, instead of implementing my new custom button as String in the config, to pass my React component
Thanks!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the custom button configuration and the React wrapper integration described in the issue. Done means a toolbox button can be configured to render a custom React component when clicked instead of requiring string content.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100