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

Integrating With Forms design #48

Closed
denis-sokolov opened this issue Oct 20, 2015 · 1 comment
Closed

Integrating With Forms design #48

denis-sokolov opened this issue Oct 20, 2015 · 1 comment

Comments

@denis-sokolov
Copy link

The current way to submit the value is

<input id="x" type="hidden" name="content">
<trix-editor input="x"></trix-editor>

This is clunky and requires establishing a global id.
Perhaps instead a name attribute on the trix-editor should create the hidden input itself?

<trix-editor name="x"></trix-editor>

The editor can create a hidden input with the name x and put it next to itself.

Similar for value setting:

<input id="x" value="Editor content goes here" type="hidden" name="content">
<trix-editor input="x"></trix-editor>
<trix-editor name="content" value="Editor content goes here"></trix-editor>
@javan
Copy link
Contributor

javan commented Oct 20, 2015

Hey @denis-sokolov, thanks for the feedback!

We initially had a setup similar to your proposal, but ultimately chose clarity over clunkiness. When you create the input element yourself, you know exactly what you're getting.

@javan javan closed this as completed Oct 20, 2015
javan added a commit that referenced this issue Mar 1, 2018
We can’t rely on all other browsers to emit keyboard and/or input events during compositions. Especially not in the same order.

Fixes #48
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

2 participants