X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/ce4cc95ff037cea6359b02b3bf14c83c4f8fdc4e..0990bc1dc7fad5165148a8993901138de9e22d0e:/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