DocumentNodeElement wlxml class getting/setting
[fnpeditor.git] / modules / documentCanvas / canvas / documentElement.js
index 0d08aab..e18f856 100644 (file)
@@ -105,8 +105,17 @@ $.extend(DocumentNodeElement.prototype, {
     after: function(params) {
         manipulate(this, params, 'after');
     },
+    getWlxmlTag: function() {
+        return this.$element.attr('wlxml-tag');
+    },
+    setWlxmlTag: function(tag) {
+        this.$element.attr('wlxml-tag', tag);
+    },
+    getWlxmlClass: function() {
+        return this.$element.attr('wlxml-class').replace('-', '.');
+    },
     setWlxmlClass: function(klass) {
-        this.$element.attr('class', klass);
+        this.$element.attr('wlxml-class', klass);
     },
     is: function(what) {
         if(what === 'list' && _.contains(['list-items', 'list-items-enum'], this.$element.attr('wlxml-class')))