Browse code

more tinyMCE consistency changes - height: 300px, width: 580px, toolbars at the top like later releases, manually resized text windows are not saved - tinyMCE 4 init cleanup

Clarissa Walker authored on 2026/07/30 10:08:27
Showing 3 changed files
... ...
@@ -13,7 +13,8 @@ echo "
13 13
 			echo "
14 14
 	tinyMCE.init({ 
15 15
 		theme: 'advanced',
16
-		height: '250',
16
+		height: '300',
17
+		width: '580',
17 18
 		language: '$language',
18 19
 		convert_urls: 'false',
19 20
 		mode: 'textareas',
... ...
@@ -24,8 +25,9 @@ echo "
24 25
 		theme_advanced_buttons3_add_before: 'tablecontrols,separator',
25 26
 		theme_advanced_buttons3_add: 'advhr',
26 27
 		theme_advanced_toolbar_align: 'center',
27
-		theme_advanced_toolbar_location: 'bottom',
28
+		theme_advanced_toolbar_location: 'top',
28 29
 		theme_advanced_statusbar_location: 'bottom',
30
+		theme_advanced_resizing_use_cookie: false,
29 31
 		theme_advanced_path: 'false',
30 32
 		editor_deselector: 'mceNoEditor',
31 33
 ";
... ...
@@ -13,7 +13,8 @@ echo "
13 13
 			echo "
14 14
 	tinyMCE.init({ 
15 15
 		theme: 'advanced',
16
-		height: '250',
16
+		height: '300',
17
+		width: '580',
17 18
 		language: '$language',
18 19
 		convert_urls: 'false',
19 20
 		mode: 'textareas',
... ...
@@ -24,8 +25,9 @@ echo "
24 25
 		theme_advanced_buttons3_add_before: 'tablecontrols,separator',
25 26
 		theme_advanced_buttons3_add: 'advhr',
26 27
 		theme_advanced_toolbar_align: 'center',
27
-		theme_advanced_toolbar_location: 'bottom',
28
+		theme_advanced_toolbar_location: 'top',
28 29
 		theme_advanced_statusbar_location: 'bottom',
30
+		theme_advanced_resizing_use_cookie: false,
29 31
 		theme_advanced_path: 'false',
30 32
 		editor_deselector: 'mceNoEditor',
31 33
 ";
... ...
@@ -1,11 +1,11 @@
1 1
 <?php
2
-$image_list_path = STORIESPATH . "/" . USERUID . "../images/imagelist.js";
2
+$image_list_path = STORIESPATH . "/" . USERUID . "/images/imagelist.js";
3 3
 $image_list_exists = file_exists($image_list_path); 
4 4
  
5 5
 if (USERUID && $image_list_exists)
6 6
 {
7 7
 echo "
8
-<script src='".STORIESPATH . "/" . USERUID . "../images/imagelist.js"."'></script>";
8
+<script src='".STORIESPATH . "/" . USERUID . "/images/imagelist.js"."'></script>";
9 9
 } 
10 10
 echo "
11 11
 	<script language=\"javascript\" type=\"text/javascript\"><!--";
... ...
@@ -30,8 +30,8 @@ echo "
30 30
 		invalid_styles: 'color,font-size,margin,line-height,font-family,margin-top,margin-bottom',
31 31
 		plugins: 'wordcount emoticons fullscreen anchor code hr image link paste ',
32 32
 		skin: 'lightgray',
33
-		min_height: 250,
34
-		width: 440,
33
+		height: 300,
34
+		width: 580,
35 35
 	    browser_spellcheck: true,
36 36
 		relative_urls: false,
37 37
 		remove_script_host: false,
... ...
@@ -53,7 +53,7 @@ echo "
53 53
 		echo "
54 54
 		theme_modern_resizing: true,".($current == "adminarea" ? "\n\t\tentity_encoding: 'raw'" : "\n\t\tinvalid_elements: 'script,object,applet,iframe'")."
55 55
    });
56
-	
56
+
57 57
 ";
58 58
 	}
59 59
 	echo "
... ...
@@ -63,21 +63,8 @@ var tinyMCEmode = true;
63 63
 
64 64
 		if (tinyMCE.get(id) == null)
65 65
 		tinymce.EditorManager.execCommand('mceAddEditor',true, id);
66
-		//tinyMCE.execCommand('mceAddControl', false, id);
67 66
 		else
68 67
 		tinymce.EditorManager.execCommand('mceRemoveEditor', true, id);
69
-		//	tinyMCE.execCommand('mceRemoveControl', false, id);
70 68
 	}
71 69
 ";
72
-/*echo "
73
-var tinyMCEmode = true;
74
-	function toogleEditorMode(id) {
75
-		var elm = document.getElementById(id);
76
-
77
-		if (tinyMCE.get(id) == null)
78
-			tinyMCE.execCommand('mceAddControl', false, id);
79
-		else
80
-			tinyMCE.execCommand('mceRemoveControl', false, id);
81
-	}
82
-";*/
83 70
 echo " --></script>";