1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-24 02:27:19 +00:00

Give the edit-text widget support for the placeholder attribute

This commit is contained in:
Jeremy Ruston 2013-10-21 22:54:48 +01:00
parent e2b8249a1b
commit 06af26b1c8

View File

@ -41,6 +41,9 @@ EditTextWidget.prototype.render = function(parent,nextSibling) {
if(this.editType) {
domNode.setAttribute("type",this.editType);
}
if(this.editPlaceholder) {
domNode.setAttribute("placeholder",this.editPlaceholder);
}
// Assign classes
domNode.className = this.editClass;
// Set the text
@ -104,6 +107,7 @@ EditTextWidget.prototype.execute = function() {
this.editIndex = this.getAttribute("index");
this.editDefault = this.getAttribute("default","");
this.editClass = this.getAttribute("class");
this.editPlaceholder = this.getAttribute("placeholder");
// Get the editor element tag and type
var tag,type;
if(this.editField === "text") {