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

Ability to change displayMode #195

Closed
wants to merge 4 commits into from
Closed

Ability to change displayMode #195

wants to merge 4 commits into from

Conversation

lucasbesen
Copy link
Member

@lucasbesen lucasbesen commented May 27, 2021

Fix #79

@@ -55,7 +56,7 @@ export default class extends Component {
this.editor = unlayer.createEditor({
...options,
id: this.editorId,
displayMode: 'email',
displayMode,
Copy link
Member

@brunolemos brunolemos Jan 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't need a new displayMode prop, we already have the options prop for that. so we could revert this displayMode prop and do this instead:

-displayMode: 'email',
+displayMode: options.displayMode || 'email',

but if we do want a new displayMode prop, currently it's ignoring if the user pass it via the options prop. so we should do something like this:

-const displayMode = this.props.displayMode || 'email';
+const displayMode = this.props.displayMode || options.displayMode || 'email';

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pushed a commit with the second option above.

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 this pull request may close these issues.

how to change displayMode
3 participants