summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsun2008-12-31 15:01:05 (GMT)
committer sun2008-12-31 15:01:05 (GMT)
commit7503d5fa0f032d950a186d522123805c0c3fa2c3 (patch)
tree8796e911230f817fbcac46f1e044ce37947966b3
parentf43c5c3145bcc83979310e11b941b9edf93365ac (diff)
#352703 by sun: Fixed wrong default configuration options for TinyMCE 3.2.1+.
-rw-r--r--CHANGELOG.txt1
-rw-r--r--editors/tinymce.inc22
2 files changed, 8 insertions, 15 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index cf18ce0..8d979a9 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -6,6 +6,7 @@ Wysiwyg x.x-x.x, xxxx-xx-xx
Wysiwyg 5.x-x.x, xxxx-xx-xx
---------------------------
+#352703 by sun: Fixed wrong default configuration options for TinyMCE 3.2.1+.
#348317 by sun: Fixed TinyMCE's extended_valid_elements for advlink/advimage
plugin.
#348986 by sun: Added CSS class for toggle link container.
diff --git a/editors/tinymce.inc b/editors/tinymce.inc
index 7321404..4db8d8e 100644
--- a/editors/tinymce.inc
+++ b/editors/tinymce.inc
@@ -222,31 +222,23 @@ function wysiwyg_tinymce_settings($editor, $config, $theme) {
$init += array(
'theme_advanced_resize_horizontal' => FALSE,
'theme_advanced_resizing_use_cookie' => FALSE,
+ 'theme_advanced_path_location' => isset($config['path_loc']) ? $config['path_loc'] : 'bottom',
+ 'theme_advanced_resizing' => isset($config['resizing']) ? $config['resizing'] : 1,
+ 'theme_advanced_toolbar_location' => isset($config['toolbar_loc']) ? $config['toolbar_loc'] : 'top',
+ 'theme_advanced_toolbar_align' => isset($config['toolbar_align']) ? $config['toolbar_align'] : 'left',
);
if (isset($config['block_formats'])) {
$init['theme_advanced_blockformats'] = $config['block_formats'];
}
- if (isset($config['path_loc'])) {
- $init['theme_advanced_path_location'] = $config['path_loc'];
- }
- if (isset($config['resizing'])) {
- $init['theme_advanced_resizing'] = $config['resizing'];
- }
- if (isset($config['toolbar_loc'])) {
- $init['theme_advanced_toolbar_location'] = $config['toolbar_loc'];
- }
- if (isset($config['toolbar_align'])) {
- $init['theme_advanced_toolbar_align'] = $config['toolbar_align'];
- }
-
if (isset($init['buttons'])) {
- // Note: These rows need to be set to NULL otherwise TinyMCE loads its
- // own buttons as defined in advanced theme.
+ // These rows explicitly need to be set to be empty, otherwise TinyMCE
+ // loads its default buttons of the advanced theme for each row.
$init += array(
'theme_advanced_buttons1' => array(),
'theme_advanced_buttons2' => array(),
'theme_advanced_buttons3' => array(),
);
+ // @todo Allow to sort/arrange editor buttons.
for ($i = 0; $i < count($init['buttons']); $i++) {
$init['theme_advanced_buttons1'][] = $init['buttons'][$i];
}