[Question] Creating custom plugins with React?
Is there a way to make custom plugins that would open up a react component instead of the html dialogs from within the plugin?
A possibility I'm seeing is using the html dialogs but have them visibly hidden. Then use a mutation observer that checks if the display is toggled for that dialog. Then query that dialogs inputs to get the values, manipulate it with the react component and insert it back into the dialog. Then finally triggering the 'submit' button from the html dialog.
Is this a good approach or is there a way to use React instead ?
Do you mean using dialogs by replacing them with React components?
Do you mean using dialogs by replacing them with React components?
Yes, exactly this
Um..I can't even think of a way right now. :( It's a complicated problem.
@JiHong88 Any way to custom UI and logic of insert image dialog plugin default?
Now I am trying to create an custom plugin to overwrite it but it show error can't open dialog.
I don't see the image dialog section in custom plugin docs here: http://suneditor.com/sample/html/customPlugins.html