X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/a398f2a96740ebe6dd60559d90e74c648e7009af..be2c8ef28fbbcf62764e5bdedf9131a1aad8317b:/modules/documentCanvas/documentCanvas.js?ds=inline diff --git a/modules/documentCanvas/documentCanvas.js b/modules/documentCanvas/documentCanvas.js index deebfca..2fa8722 100644 --- a/modules/documentCanvas/documentCanvas.js +++ b/modules/documentCanvas/documentCanvas.js @@ -29,8 +29,17 @@ return function(sandbox) { }, modifyCurrentNode: function(attr, value) { if(manager.currentNode) { - manager.getNodeElement(manager.currentNode).attr('wlxml-'+attr, value); + if(attr === 'tag') { + manager.getNodeElement(manager.currentNode).attr('wlxml-'+attr, value); + } + else if(attr === 'class') { + manager.currentNode.setClass(value); + } else { + // changing node meta attr + manager.currentNode.setMetaAttr(attr, value); + } sandbox.publish('contentChanged'); + sandbox.publish('currentNodeChanged', manager.currentNode); } }, highlightNode: function(canvasNode) {