Ox.Editable: add tags and replaceTags options

This commit is contained in:
rolux 2013-02-15 18:01:49 +05:30
parent 3cdaebadee
commit 180b325e30

View file

@ -32,7 +32,9 @@ Ox.Editable = function(options, self) {
highlight: null, highlight: null,
maxHeight: void 0, maxHeight: void 0,
placeholder: '', placeholder: '',
replaceTags: {},
submitOnBlur: true, submitOnBlur: true,
tags: null,
tooltip: '', tooltip: '',
value: '', value: '',
width: 0, width: 0,
@ -222,7 +224,7 @@ Ox.Editable = function(options, self) {
).replace(/\0/g, '\n\n').trim(); ).replace(/\0/g, '\n\n').trim();
return (self.options.type == 'input' return (self.options.type == 'input'
? Ox.encodeHTMLEntities(value) ? Ox.encodeHTMLEntities(value)
: Ox.sanitizeHTML(value) : Ox.sanitizeHTML(value, self.options.tags, self.options.replaceTags)
); );
} }