froala / react-froala-wysiwyg

React component for Froala WYSIWYG HTML Rich Text Editor.
https://froala.com/wysiwyg-editor
562 stars 130 forks source link

React Froala Editor is not initializing on a textarea #248

Open nsabourin opened 4 years ago

nsabourin commented 4 years ago
ReactDOM.render(
                        <FroalaEditorComponent
                            tag="textarea"
                            model={$('#compose_email_body').val()}
                        />,
                        $('#compose_email_body')[0]
                    );

code in inspector : image

editor in the textarea ? with the version without react we can initialize new one on textarea for forms : https://froala.com/wysiwyg-editor/examples/textarea/

result : a plain textarea

image

I know I should use state with model prop, but I can't because the form is not sent by react.

aleksandarcrvc commented 4 years ago

Just to confirm that this is not working with state as well. It renders textarea with display: none.

mstangret commented 4 years ago

Looks like it works correctly with the newest version 3.2.1-1