Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to change displayMode #79

Open
doudoucomic opened this issue Jun 18, 2019 · 11 comments
Open

how to change displayMode #79

doudoucomic opened this issue Jun 18, 2019 · 11 comments

Comments

@doudoucomic
Copy link

i want 'web' mode. but in react .i can't find this props?how to change?thanks

@derit
Copy link

derit commented Sep 29, 2019

@doudoucomic you need to change this code
or
set options parameter with displayMode: "web"

@RaptorRob
Copy link

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.

@derit
Copy link

derit commented Oct 8, 2019

i was create a pull request for provide this issue, look that
#93

@lidrissi
Copy link

lidrissi commented Oct 8, 2019

The project name is react-email-editor 😃 if they offer this possibility then they should rename the project

@dimasabimanyy
Copy link

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.

@derit
Copy link

derit commented Sep 20, 2021

@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
derit@02d900d

@alina-unlayer
Copy link

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

@btknorr
Copy link

btknorr commented Apr 14, 2023

Can we please get this fixed and supported? I cannot believe you are hardcoding displayMode to email and not allowing us to use web.

@rossWewing
Copy link

As a paid embed and an active PR its mad i still have to fork this to fix a hard coded parameter

@rakeshmukundan
Copy link

@adeelraza not sure if you are unlayer team, but since I saw you merge few PRs. Please consider merging this as well

@dmost714
Copy link

dmost714 commented Jun 8, 2023

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:

dmost714@a0c2c18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants