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

Improve text editor example #226

Merged
merged 3 commits into from
Sep 25, 2023

Conversation

ttytm
Copy link
Member

@ttytm ttytm commented Sep 23, 2023

Two improvements are made. Currently, saving a file is only enabled when a file is opened. This is accompanied by that it is not possible to save text that is simply typed into the editor - without a file having been opened before.

The PR:

  • Enables the save button when a change is made in the editor. It will also be disabled again after saving a file until the next change is made.
  • Allows saving text entered in the editor when no file has been opened and sets the file data (doctitle and language) after saving.
  • Makes some minor refactors.

Allow to save a documents when not opening a file
@ttytm ttytm force-pushed the examples/improve-text-editor branch from 202bb16 to bcf19bd Compare September 23, 2023 23:39
@hassandraga
Copy link
Member

LGTM

@hassandraga hassandraga merged commit 8fa5c8f into webui-dev:main Sep 25, 2023
@ttytm ttytm deleted the examples/improve-text-editor branch September 28, 2023 23:09
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.

3 participants