X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/ff17619a4071364ea15383c696cb7e84b6c83089..26f26828b3cad2c2c1a2f7d4d3c06c025c212f98:/modules/documentCanvas/documentCanvas.js diff --git a/modules/documentCanvas/documentCanvas.js b/modules/documentCanvas/documentCanvas.js index 50a3777..2fa8722 100644 --- a/modules/documentCanvas/documentCanvas.js +++ b/modules/documentCanvas/documentCanvas.js @@ -29,8 +29,11 @@ return function(sandbox) { }, modifyCurrentNode: function(attr, value) { if(manager.currentNode) { - if(_.contains(['tag', 'class'], attr)) { + 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);