-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Add an api to update the placeholder text (or maybe any config options?) #1150
Comments
Many of the configuration options are not meant to and cannot be changed dynamically. I think it is fine to just change the |
@jhchen I'm all for light and simple, but APIs provide discoverability, isolation from implementation details, and clear supportability (i.e. a contract) -- and if done well don't add bloat. As this method isn't even documented -- I have no assurance that the next version of Quill won't break this behavior. There is no contract there -- not for you nor the user. The lack of an API and/or documentation causes each user to figure out on their own (i.e. google) what could be simply addressed for everyone. Instead of coming away pleased at Quill from support dynamically updated placeholders in my app, I came away frustrated (for the time I spent figuring it out and not on my application code) and uneasy with the solution. Now I definitely don't want you to take that the wrong way -- I am VERY happy overall with Quill, but often its the little paper-cuts that sting the worst especially when they could so simply be avoided. |
I totally agree with @eamodio. @jhchen: I respect your call on not having an API for changing the placeholder. As a side note (I'm leaving it here in case that someone else needs it as well) you can set the placeholder this way too: quill.root.setAttribute('data-placeholder', "Your new placeholder"); This is how is done right now on Quill's constructor. |
It would be great if there was an api to update the placeholder text after quill is created.
Having to use
Feels like reaching into the guts of quill and accessing an implementation detail that could break in the future (it is also undocumented).
It might also be worth a generic configuration options update method or something that isn't just limited to the placeholder.
The text was updated successfully, but these errors were encountered: