Bootstrap X-editable – use div, ajax or function to load custom type editor?-open source projects vitalets/x-editable
I’m using Bootstrap 3 with X-editable ( http://vitalets.github.io/bootstrap-editable/ )
I require a variety of custom type editors. It’s impractical to implement them as string templates as indicated in the sample code:
callOrQuoteEditor.defaults = $.extend({}, $.fn.editabletypes.abstractinput.defaults, {
tpl: '' +
'' +
'' +
' call' +
' quote' +
'' +
' within ' +
'' +
'' +
' minute(s)' +
' hour(s)' +
' day(s)' +
'' +
'' +
'',
inputclass: ''
});
Rather I would like to do one of the following:
1) Load the template using an AJAX loaded form
2) Load the template from an existing, hidden
3) Load the template from a function call, from which I can return whatever I like
I cannot find any way in the documentation or sample code to do this.
Short of hacking bootstrap-editable.js script, what can I do?