X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/ce4cc95ff037cea6359b02b3bf14c83c4f8fdc4e..4ddf36452af460dbc26fd181f2ba3640a7c71374:/src/editor/modules/documentCanvas/canvas/documentElement.js?ds=sidebyside diff --git a/src/editor/modules/documentCanvas/canvas/documentElement.js b/src/editor/modules/documentCanvas/canvas/documentElement.js index cd6b3d8..89ffce9 100644 --- a/src/editor/modules/documentCanvas/canvas/documentElement.js +++ b/src/editor/modules/documentCanvas/canvas/documentElement.js @@ -527,8 +527,13 @@ $.extend(DocumentTextElement.prototype, { prependText: function(text) { this.dom().contents()[0].data = text + this.dom().contents()[0].data; }, - getText: function() { - return this.dom().text().replace(utils.unicode.ZWS, ''); + getText: function(options) { + options = _.extend({raw: false}, options || {}); + var toret = this.dom().text(); + if(!options.raw) { + toret = toret.replace(utils.unicode.ZWS, ''); + } + return toret; }, isEmpty: function() { // Having at least Zero Width Space is guaranteed be Content Observer