|
|
@ -3,6 +3,7 @@ |
|
|
|
* @class BI.Text |
|
|
|
* @class BI.Text |
|
|
|
* @extends BI.Single |
|
|
|
* @extends BI.Single |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
!(function () { |
|
|
|
BI.Text = BI.inherit(BI.Single, { |
|
|
|
BI.Text = BI.inherit(BI.Single, { |
|
|
|
|
|
|
|
|
|
|
|
props: { |
|
|
|
props: { |
|
|
@ -152,7 +153,16 @@ BI.Text = BI.inherit(BI.Single, { |
|
|
|
BI.isKey(this.options.keyword) && this.doRedMark(this.options.keyword); |
|
|
|
BI.isKey(this.options.keyword) && this.doRedMark(this.options.keyword); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
var formatters = []; |
|
|
|
|
|
|
|
BI.Text.addTextFormatter = function (formatter) { |
|
|
|
|
|
|
|
formatters.push(formatter); |
|
|
|
|
|
|
|
}; |
|
|
|
BI.Text.formatText = function (text) { |
|
|
|
BI.Text.formatText = function (text) { |
|
|
|
|
|
|
|
for (var i = 0, len = formatters.length; i < len; i++) { |
|
|
|
|
|
|
|
text = formatters[i](text); |
|
|
|
|
|
|
|
} |
|
|
|
return text; |
|
|
|
return text; |
|
|
|
}; |
|
|
|
}; |
|
|
|
BI.shortcut("bi.text", BI.Text); |
|
|
|
BI.shortcut("bi.text", BI.Text); |
|
|
|
|
|
|
|
}()); |
|
|
|
|
|
|
|
|
|
|
|