react-email-editor
react-email-editor copied to clipboard
how to change displayMode
i want 'web' mode. but in react .i can't find this props?how to change?thanks
@doudoucomic you need to change this code
or
set options parameter with displayMode: "web"
Would be better if that could be passed through with a property. otherwise this will vanish from your application should you ever decide to update your third party components.
i was create a pull request for provide this issue, look that https://github.com/unlayer/react-email-editor/pull/93
The project name is react-email-editor
😃 if they offer this possibility then they should rename the project
Hi @derit i wonder why passing a displayMode params to options doesn't work for me.
<EmailEditor options={{ safeHtml : true, displayMode : "web" }} ref={emailEditorRef} onLoad={onLoadEditor} tools={{ html: { enabled: true } }} />
do you have any idea ? thanks.
@dimasabimanyy my merge request currently still open, you can't change display mode
mr ku belum di merge mas
see this change, you can clone my code and add to your project https://github.com/derit/react-email-editor/commit/02d900ddbae186fc7b1502b2fdd98046d199c83b
You can fork the plugin and replace the following line to make the editor work in 'web' mode:
https://github.com/unlayer/react-email-editor/blob/master/src/index.js#L58
Can we please get this fixed and supported? I cannot believe you are hardcoding displayMode to email and not allowing us to use web.
As a paid embed and an active PR its mad i still have to fork this to fix a hard coded parameter
@adeelraza not sure if you are unlayer team, but since I saw you merge few PRs. Please consider merging this as well
I didn't test this well (or really at all), but I think all you need to do is move the ...options
down to after the last key in the object that gets passed into createEditor()
. This way any user provided values will override default values:
https://github.com/dmost714/react-email-editor/commit/a0c2c182850dfa51991f878cd579deb974b8a202