From ef7cce95894cec592ba74b1c1b3ce48993733c65 Mon Sep 17 00:00:00 2001 From: Christoph Schiessl Date: Wed, 30 May 2012 13:21:28 +0200 Subject: [PATCH] allow digits in html class names in commands for fontSize, fontColor, justifyCenter, justifyLeft, justifyRight --- src/commands/fontSize.js | 2 +- src/commands/foreColor.js | 2 +- src/commands/justifyCenter.js | 2 +- src/commands/justifyLeft.js | 2 +- src/commands/justifyRight.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/commands/fontSize.js b/src/commands/fontSize.js index 7ba76ca3..f8deedbc 100644 --- a/src/commands/fontSize.js +++ b/src/commands/fontSize.js @@ -5,7 +5,7 @@ */ (function(wysihtml5) { var undef, - REG_EXP = /wysiwyg-font-size-[a-z\-]+/g; + REG_EXP = /wysiwyg-font-size-[0-9a-z\-]+/g; wysihtml5.commands.fontSize = { exec: function(composer, command, size) { diff --git a/src/commands/foreColor.js b/src/commands/foreColor.js index 9d9e5e6f..46d40df8 100644 --- a/src/commands/foreColor.js +++ b/src/commands/foreColor.js @@ -5,7 +5,7 @@ */ (function(wysihtml5) { var undef, - REG_EXP = /wysiwyg-color-[a-z]+/g; + REG_EXP = /wysiwyg-color-[0-9a-z]+/g; wysihtml5.commands.foreColor = { exec: function(composer, command, color) { diff --git a/src/commands/justifyCenter.js b/src/commands/justifyCenter.js index 78edc97c..9cc4514c 100644 --- a/src/commands/justifyCenter.js +++ b/src/commands/justifyCenter.js @@ -1,7 +1,7 @@ (function(wysihtml5) { var undef, CLASS_NAME = "wysiwyg-text-align-center", - REG_EXP = /wysiwyg-text-align-[a-z]+/g; + REG_EXP = /wysiwyg-text-align-[0-9a-z]+/g; wysihtml5.commands.justifyCenter = { exec: function(composer, command) { diff --git a/src/commands/justifyLeft.js b/src/commands/justifyLeft.js index c6c7e150..7d6a1e0e 100644 --- a/src/commands/justifyLeft.js +++ b/src/commands/justifyLeft.js @@ -1,7 +1,7 @@ (function(wysihtml5) { var undef, CLASS_NAME = "wysiwyg-text-align-left", - REG_EXP = /wysiwyg-text-align-[a-z]+/g; + REG_EXP = /wysiwyg-text-align-[0-9a-z]+/g; wysihtml5.commands.justifyLeft = { exec: function(composer, command) { diff --git a/src/commands/justifyRight.js b/src/commands/justifyRight.js index 80bca1b5..3a7505ba 100644 --- a/src/commands/justifyRight.js +++ b/src/commands/justifyRight.js @@ -1,7 +1,7 @@ (function(wysihtml5) { var undef, CLASS_NAME = "wysiwyg-text-align-right", - REG_EXP = /wysiwyg-text-align-[a-z]+/g; + REG_EXP = /wysiwyg-text-align-[0-9a-z]+/g; wysihtml5.commands.justifyRight = { exec: function(composer, command) {