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 editor mode for only show left、right、or both? #3708

Open
yetrun opened this issue Nov 24, 2022 · 0 comments
Open

How to change editor mode for only show left、right、or both? #3708

yetrun opened this issue Nov 24, 2022 · 0 comments

Comments

@yetrun
Copy link

yetrun commented Nov 24, 2022

Q&A (please complete the following information)

  • OS: [Linux]
  • Browser: [chrome, safari]
  • Method of installation: [yarn add swagger-editor]
  • Swagger-Editor version: [4.5.1]
  • Swagger/OpenAPI version: [OpenAPI 3.0]

Content & configuration

In my app, I give three redio to switch layout mode:

<radio value="left">Only Left Pane(Editor)</radio>
<radio value="right">Only Right Pane(UI)</radio>
<radio value="both">Both Panes(Split)</radio>

I have seen the editor provides a layoutActions and I invoke with:

editor.layoutActions.changeMode(['split_pane_mode'], 'left')

No works any more. And then I invoke with:

editor.layoutActions.updateLayout(['split_pane_mode'])

No works else.

Screenshots

How can we help?

So I wonder what behavior will these two methods do? Thank you for all helps! And the right way to change layout mode?

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

No branches or pull requests

1 participant