X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/16365557b20c7efc689f3c6bf8e66882015df76b..d4e89595e829f60443056ce65f5f275d10f882ed:/modules/visualEditor.transformations.js?ds=inline diff --git a/modules/visualEditor.transformations.js b/modules/visualEditor.transformations.js index 22deba5..cfb5877 100644 --- a/modules/visualEditor.transformations.js +++ b/modules/visualEditor.transformations.js @@ -14,14 +14,14 @@ if(typeof module !== 'undefined' && module.exports) { toret.find('metadata').remove(); var toBlock = ['div', 'document', 'section', 'header']; - var toInline = ['aside']; + var toInline = ['aside', 'span']; toBlock.forEach(function(tagName) { tagName = tagName.toLowerCase(); console.log('running ' + tagName); toret.find(tagName).replaceWith(function() { var suffix = tagName !== 'div' ? tagName : 'block'; - return $('
').addClass('rng-' + suffix).append($(this).contents()); + return $('
').addClass('rng rng-' + suffix).append($(this).contents()); }); }); @@ -29,7 +29,7 @@ if(typeof module !== 'undefined' && module.exports) { tagName = tagName.toLowerCase(); toret.find(tagName).replaceWith(function() { var node = this; - return $('').addClass('rng-' + tagName).append($(this).contents()); + return $('').addClass('rng rng-' + tagName).append($(this).contents()); }); }); return toret.children();