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