/** Text input @class text @extends abstractinput @final @example awesome **/ (function ($) { var Text = function (options) { this.init('text', options, Text.defaults); }; $.fn.editableutils.inherit(Text, $.fn.editabletypes.abstractinput); $.extend(Text.prototype, { activate: function() { if(this.$input.is(':visible')) { this.$input.focus(); $.fn.editableutils.setCursorPosition(this.$input.get(0), this.$input.val().length); } } }); Text.defaults = $.extend({}, $.fn.editabletypes.abstractinput.defaults, { /** @property tpl @default **/ tpl: '', /** Placeholder attribute of input. Shown when input is empty. @property placeholder @type string @default null **/ placeholder: null }); $.fn.editabletypes.text = Text; }(window.jQuery));