sniperwolf / taggingJS

jQuery plugin to tagging like a charm!
http://sniperwolf.github.io/taggingJS/
MIT License
933 stars 151 forks source link

Adding a Placeholder #46

Open lucianobosco opened 8 years ago

lucianobosco commented 8 years ago

Wondering if there is a way to add a placeholder text like an input element.

Thanks in advance

dishcandanty commented 8 years ago

Just thought I'd drop a comment about monkey patching this: Lines 408

            // Create the type_zone input using custom class and contenteditable attribute
            self.$type_zone = $( document.createElement( "input" ) )
                             .addClass( self.config[ "type-zone-class" ] )
                             .attr( "contenteditable", true )
                             .attr("placeholder", "New Tag");

I imagine you could do something like: .attr("placeholder", self.config[ "type-zone-placeholder" ] )

If I find that i need customized placeholders in my project and I end up doing this Ill paste the results/pull request