Open StarAzure opened 3 years ago
How to wrap editor js text around a react component such as material ui Alert ?
Something like:
<Alert severity="error">This is the text entered in editor JS</Alert>
import Alert from '@material-ui/lab/Alert'; class Alert { static get toolbox() { return { title: 'Image', icon: 'SomeSVG' }; } render(){ return document.createElement('input'); } save(blockContent){ return { url: blockContent.value } } }
Can't understand the question, need more details.
I have created a babel plugin that wraps a React component with a block tool class definition for this case. You can check it out here. Though, It is experimental, so use it at your own risk.
How to wrap editor js text around a react component such as material ui Alert ?
Something like:
<Alert severity="error">This is the text entered in editor JS</Alert>