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

Ctrl+S in Sublime to click on submit button in Chrome #44

Closed
radubr opened this issue Dec 15, 2014 · 2 comments
Closed

Ctrl+S in Sublime to click on submit button in Chrome #44

radubr opened this issue Dec 15, 2014 · 2 comments

Comments

@radubr
Copy link

radubr commented Dec 15, 2014

Hi,

First off all congrats on the job well done.

I suggest a feature that when a user saves the file in Sublime it automatically clicks on the submit button on the related page in Chrome so it's update there also. It's best to keep the possibility to undo any changes.

Very useful for making live editing in WordPress and other CMSs. It skips the step of installing a plugin to do it every time.

Regards,
Radu

@fregante
Copy link
Owner

Thanks, Radu. Unfortunately there are a few issues:

  • it could be as simple as textarea.form.submit.click() for <textarea> fields (like in WordPress' theme-editor.php page), but support for complex javascript editors and non-standard forms is more complicated
  • how do we tell the user that this functionality might work on the current site or that it doesn't?
  • supporting this means breaking the save functionality in the text editor.
  • once you "save" the file, the form is sent, page reloads and GT connection is lost, so you might as well switch to the browser and click on the [Save] button yourself.

So while it may be feasible, it's not practical and introduces more issues.

Were you hoping to use this for the wp-admin/theme-editor.php page or in the post editor page (wp-admin/post-new.php)?

@Cacodaimon
Copy link
Contributor

  • it could be as simple as textarea.form.submit.click() for <textarea> fields (like in WordPress' theme-editor.php page), but support for complex javascript editors and non-standard forms is more complicated

As long the code editor is nested into the right form this should be no problem, otherwise remote submission would be disabled.

  • how do we tell the user that this functionality might work on the current site or that it doesn't?

If the input area is nested into a from tag we could show the user if remote submitting is available or not.

  • supporting this means breaking the save functionality in the text editor.

Yes "overriding" the on save would be a bad idea but whats about a extra keyboard shortcut for submitting forms.

  • once you "save" the file, the form is sent, page reloads and GT connection is lost, so you might as well switch to the browser and click on the [Save] button yourself.

I only can agree with you!

So while it may be feasible, it's not practical and introduces more issues.

I'm not afraid about the issue but the practical reason is not clear at the moment.

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

3 participants