Browse code

tinyMCE '2' is now 2.1.2 - Seems tinyMCE '2' was actually 3.0.9 (my fault for not checking), so '2' is now 2.1.2, and '3' is now 3.4.8... eFiction 3.4.3 used tinyMCE 2.1.0, and 3.5 upgraded that to 3.0.9.

Clarissa Walker authored on 2026/07/28 07:20:33
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,53 @@
1
+/**
2
+ * $Id$
3
+ *
4
+ * @author Moxiecode
5
+ * @copyright Copyright � 2004-2007, Moxiecode Systems AB, All rights reserved.
6
+ *
7
+ * The contents of this file will be wrapped in a class later on.
8
+ */
9
+
10
+/**#@+
11
+ * @member TinyMCE_Engine
12
+ * @method
13
+ */
14
+tinyMCE.add(TinyMCE_Engine, {
15
+	/**
16
+	 * Returns a cleared array, since some external libraries tend to extend the Array core object
17
+	 * arrays needs to be cleaned from these extended functions. So this function simply setting any
18
+	 * named properties to null.
19
+	 *
20
+	 * @param {Array} Name/Value array to clear.
21
+	 * @return Cleared name/value array.
22
+	 * @type Array
23
+	 */
24
+	clearArray : function(a) {
25
+		var n;
26
+
27
+		for (n in a)
28
+			a[n] = null;
29
+
30
+		return a;
31
+	},
32
+
33
+	/**
34
+	 * Splits a string by the specified delimiter and skips any empty items.
35
+	 *
36
+	 * @param {string} d Delimiter to split by.
37
+	 * @param {string} s String to split.
38
+	 * @return Array with chunks from string.
39
+	 * @type Array
40
+	 */
41
+	explode : function(d, s) {
42
+		var ar = s.split(d), oar = [], i;
43
+
44
+		for (i = 0; i<ar.length; i++) {
45
+			if (ar[i] !== '')
46
+				oar[oar.length] = ar[i];
47
+		}
48
+
49
+		return oar;
50
+	}
51
+});
52
+
53
+/**#@-*/