Quill: Placeholder

Created on 15 May 2014  Â·  8Comments  Â·  Source: quilljs/quill

Similar to

<input type="text" placeholder="Type here">

This seems very simple so there is definitely a chance I'm just missing it in the docs.

feature

Most helpful comment

The beta release has a placeholder configuration option.

All 8 comments

Should definitely be a "module" IMO. Probably not too hard to implement off of the top of my head:

  1. Upon instantiation, insert a placeholder <div> with your placeholder text content inside. Quill#addContainer() would work well for this.
  2. Listen for the "text-change" event in order to remove the placeholder <div> once there's some text content in the editor (container.parentNode.removeChild(container)).

is anyone working on this? would like to give this a shot

@vegetableman please do :)

@TooTallNate Have sent a pull request for the same. Took the quora editor approach. Instead of adding and destroying the placeholder node, a 'placeholder-container' class is toggled on the editor-container. And the class has a pseudo-selector with content as the placeholder text.

Any progress with that?

Would be a nice feature to have.

I wrote a module for this, but it's not the best.

If you wanted to collaborate, I'd be more than happy to review PRs (or
setup time to talk about how to improve it)!

The repo is called "quill-placeholder" bc I am uncreative with names.

On Wed, Mar 16, 2016 at 17:08 Erik Montes [email protected] wrote:

Would be a nice feature to have.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
https://github.com/quilljs/quill/issues/102#issuecomment-197617570

The beta release has a placeholder configuration option.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

CHR15- picture CHR15-  Â·  3Comments

Kivylius picture Kivylius  Â·  3Comments

emanuelbsilva picture emanuelbsilva  Â·  3Comments

eamodio picture eamodio  Â·  3Comments

Yves-K picture Yves-K  Â·  3Comments