Skip to content

Commit

Permalink
Merge pull request refinery#983 from wakeless/fix-js
Browse files Browse the repository at this point in the history
Class is a reserved word. try klass
  • Loading branch information
ugisozols committed Sep 13, 2011
2 parents 62a828a + a1a9dca commit 96501f7
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -1182,10 +1182,10 @@ WYMeditor.editor.prototype.switchTo = function(selectionOrNode,sType) {
// we have a node.
var html = $(selectionOrNode).html();
var newNode = this._doc.createElement(sType);
var class = $(selectionOrNode).attr('class');
var klass = $(selectionOrNode).attr('class');

// copy across the css class names.
if(typeof class !== 'undefined'){
if(typeof klass !== 'undefined'){
$.each($(selectionOrNode).attr('class').split(" "), function(index, className) {
$(newNode).addClass(className);
});
Expand Down

0 comments on commit 96501f7

Please sign in to comment.