quill icon indicating copy to clipboard operation
quill copied to clipboard

Keep placeholder for empty heading

Open Alvol opened this issue 1 year ago • 2 comments

After text format changed from normal to heading placeholder is removed from empty editor Creating new issue, since #2968 is not fixed in quill 2.0

Steps for Reproduction

  1. Visit quill playground
  2. Change format from Normal to Heading 1 or Heading 2

Expected behavior: Placeholder should we visible, with heading format applied

Actual behavior: No placeholder

Platforms:

Windows 10, Chrome 124, Firefox 126

Version:

2.0.0

Alvol avatar Apr 18 '24 10:04 Alvol

Before Quill implements this, you can achieve a similar behavior via pure CSS (Example). You have to tweak the style though e.g. increase the placeholder font size if the current format is heading.

luin avatar Apr 19 '24 14:04 luin

@luin yes, thanks for you suggestion. I'm just not sure it's good idea for me to write custom definition of empty text, base on quill inner structure. But, of course, as a workaround it should do it.

Alvol avatar Apr 22 '24 10:04 Alvol