How to display the placeholder attribute in HTML5

2019-07-05 03:54发布

问题:

I have a textarea in a HTML5 website with a proper placeholder="Sample text" attribute. It is displaying nicely until I add RichText support through CKEditor. The CKEditor GUI is recreating the textarea and is not displaying the placeholder text inside. Is there a way to display placeholders in CKEditor or switch some configuration options?

回答1:

You can use the new version of configHelper plugin: http://alfonsoml.blogspot.com.es/2012/04/placeholder-text-in-ckeditor.html it will use automatically the placeholder attribute of your textarea