Allow for muting contentSet event in smartxml.loadXML if desired
[fnpeditor.git] / src / smartxml / smartxml.js
index f4aa9fe..b81b0f0 100644 (file)
@@ -242,10 +242,12 @@ $.extend(Document.prototype, Backbone.Events, {
         return new this.TextNodeFactory(nativeNode, this);
     },
 
-    loadXML: function(xml) {
+    loadXML: function(xml, options) {
+        options = options || {};
         defineDocumentProperties(this, $(parseXML(xml)));
-        
-        this.trigger('contentSet');
+        if(!options.silent) {
+            this.trigger('contentSet');
+        }
     },
 
     toXML: function() {