includes/clientside/tinymce/plugins/fullpage/editor_plugin_src.js
changeset 778 57ce13805b6f
parent 543 dffcbfbc4e59
child 1193 e3b94bd055dc
--- a/includes/clientside/tinymce/plugins/fullpage/editor_plugin_src.js	Sun Dec 21 15:35:46 2008 -0500
+++ b/includes/clientside/tinymce/plugins/fullpage/editor_plugin_src.js	Sun Dec 21 16:28:00 2008 -0500
@@ -1,5 +1,5 @@
 /**
- * $Id: editor_plugin_src.js 827 2008-04-29 15:02:42Z spocke $
+ * $Id: editor_plugin_src.js 920 2008-09-09 14:05:33Z spocke $
  *
  * @author Moxiecode
  * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
@@ -51,21 +51,23 @@
 			if (attr && attr[1]) {
 				bdattr = attr[1].match(/\s*(\w+\s*=\s*".*?"|\w+\s*=\s*'.*?'|\w+\s*=\s*\w+|\w+)\s*/g);
 
-				for(i = 0, len = bdattr.length; i < len; i++) {
-					kv = bdattr[i].split('=');
-					k = kv[0].replace(/\s/,'');
-					v = kv[1];
+				if (bdattr) {
+					for(i = 0, len = bdattr.length; i < len; i++) {
+						kv = bdattr[i].split('=');
+						k = kv[0].replace(/\s/,'');
+						v = kv[1];
 
-					if (v) {
-						v = v.replace(/^\s+/,'').replace(/\s+$/,'');
-						t = v.match(/^["'](.*)["']$/);
+						if (v) {
+							v = v.replace(/^\s+/,'').replace(/\s+$/,'');
+							t = v.match(/^["'](.*)["']$/);
 
-						if (t)
-							v = t[1];
-					} else
-						v = k;
+							if (t)
+								v = t[1];
+						} else
+							v = k;
 
-					ed.dom.setAttrib(ed.getBody(), 'style', v);
+						ed.dom.setAttrib(ed.getBody(), 'style', v);
+					}
 				}
 			}
 		},