-
Notifications
You must be signed in to change notification settings - Fork 752
Description
Is there any way to get a string of plain html from a react component, but on the client side?
My app has a design editor that lets you click elements and edit their style, nothing new there, but I'm re-making it from the ground up using react-rails both for the app itself and for the templates that should be edited inside an iframe and then rendered elsewhere.
Attaching click handlers to every editable element conditionally (eg: if the view is being rendered inside an iframe, for the editor) would be a nightmare, and I can't just use jquery $('.is-editable').click() like I used to because of the virtual DOM.
Taking all that in account, it seems that the only solution is rendering the would-be-edited view as plain HTML so I can use the $('.is-editable').click() approach inside my editor.
Any insights or similar experiences?