Commit 86092cf8 authored by Nigel McNie's avatar Nigel McNie
Browse files

Set the obscure tinymce options to use absolute urls from the correct wwwroot (I hope). Fixes #1730

parent f1cdb383
...@@ -681,6 +681,7 @@ EOF; ...@@ -681,6 +681,7 @@ EOF;
$content_css = json_encode(theme_get_url('style/tinymce.css')); $content_css = json_encode(theme_get_url('style/tinymce.css'));
$language = substr(current_language(), 0, 2); $language = substr(current_language(), 0, 2);
$wwwroot = json_encode(get_config('wwwroot'));
$tinymceinit = <<<EOF $tinymceinit = <<<EOF
<script type="text/javascript"> <script type="text/javascript">
tinyMCE.init({ tinyMCE.init({
...@@ -696,7 +697,9 @@ tinyMCE.init({ ...@@ -696,7 +697,9 @@ tinyMCE.init({
theme_advanced_toolbar_location : "top", theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "center", theme_advanced_toolbar_align : "center",
content_css : {$content_css}, content_css : {$content_css},
execcommand_callback : "blogpostExecCommandHandler" execcommand_callback : "blogpostExecCommandHandler",
document_base_url: {$wwwroot},
relative_urls: false
}); });
</script> </script>
EOF; EOF;
......
...@@ -96,6 +96,7 @@ function &smarty($javascript = array(), $headers = array(), $pagestrings = array ...@@ -96,6 +96,7 @@ function &smarty($javascript = array(), $headers = array(), $pagestrings = array
$smarty = smarty_core(); $smarty = smarty_core();
$wwwroot = get_config('wwwroot'); $wwwroot = get_config('wwwroot');
$jswwwroot = json_encode($wwwroot);
$theme_list = array(); $theme_list = array();
...@@ -163,7 +164,9 @@ tinyMCE.init({ ...@@ -163,7 +164,9 @@ tinyMCE.init({
button_tile_map: true, button_tile_map: true,
{$tinymce_config} {$tinymce_config}
language: '{$language}', language: '{$language}',
content_css : {$content_css} content_css : {$content_css},
document_base_url: {$jswwwroot},
relative_urls: false
}); });
</script> </script>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment