Ox.Editable: add tags and replaceTags options
This commit is contained in:
parent
3cdaebadee
commit
180b325e30
1 changed files with 3 additions and 1 deletions
|
@ -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)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue