Placeholder for editable regions
See original GitHub issueHi!
I’ve seen that you patched this issue but I think we need a placeholder text too. On a regular HTML input
field, you have the placeholder
attribute. For instance, you can have this code:
<input type='text' name='username' value='' placeholder='Please enter a username'>
The code above will display a faded text on the field. When the user clicks the field, the placeholder text will still be shown and only disappear if the user types something. When the user deletes everything again, the placeholder text will be shown again. This would be very beneficial to have in Content Tools too 😃
To be more specific, here’s the kind of usage that I’m looking for:
<div class="article-title" data-editable data-name="article-title" data-placeholder-type="h1" data-placeholder="Enter a title here">
So data-placeholder-type
AND a data-placeholder
on a data-editable
div would be awesome 😄
Also, i noticed a small bug for the issue mentioned above (#180): if you have an element like this:
<div class="article-title" data-editable data-name="article-title" data-placeholder-type="h1">
and you delete all the text, there will be a new empty <h1>
added (which was the whole purpose of that enhancement), but if you click on another editable element in the page, such as:
<div id="article-content" class="article-content" data-editable data-name="article-content">
then it will reset back to a <p>
element.
Thanks for your time and keep up the great job 😃
Issue Analytics
- State:
- Created 7 years ago
- Comments:15 (7 by maintainers)
Top GitHub Comments
@okaybmd thanks very much for all your detailed feedback - really useful 👍
Edit: I can’t upload a zip file, it says
Unfortunately, we don’t support that file type. Choose Files Try again with a PNG, GIF, JPG, DOCX, PPTX, XLSX, TXT, PDF, or ZIP.
But it is a zip! AAAAH!So I’ve uploaded the file here: http://www.filedropper.com/contenttools-edit
Thanks again for all you’ve done 😃
2nd edit: I’m using Chrome too (Version 51.0.2704.103 m) on Windows 7.