|
|
|
@ -3,6 +3,7 @@
|
|
|
|
|
* @class BI.Text |
|
|
|
|
* @extends BI.Single |
|
|
|
|
*/ |
|
|
|
|
!(function () { |
|
|
|
|
BI.Text = BI.inherit(BI.Single, { |
|
|
|
|
|
|
|
|
|
props: { |
|
|
|
@ -152,7 +153,16 @@ BI.Text = BI.inherit(BI.Single, {
|
|
|
|
|
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) { |
|
|
|
|
for (var i = 0, len = formatters.length; i < len; i++) { |
|
|
|
|
text = formatters[i](text); |
|
|
|
|
} |
|
|
|
|
return text; |
|
|
|
|
}; |
|
|
|
|
BI.shortcut("bi.text", BI.Text); |
|
|
|
|
}()); |
|
|
|
|
|
|
|
|
|