X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/b95e2e87d96a747f503990f6f315ade26fe88acc..7a3c737d962ff2b2e2653fd8ed0108e92c7fe0d5:/src/editor/modules/documentCanvas/canvas/documentElement.js 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