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;
$content_css = json_encode(theme_get_url('style/tinymce.css'));
$language = substr(current_language(), 0, 2);
$wwwroot = json_encode(get_config('wwwroot'));
$tinymceinit = <<<EOF
<script type="text/javascript">
tinyMCE.init({
......@@ -696,7 +697,9 @@ tinyMCE.init({
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "center",
content_css : {$content_css},
execcommand_callback : "blogpostExecCommandHandler"
execcommand_callback : "blogpostExecCommandHandler",
document_base_url: {$wwwroot},
relative_urls: false
});
</script>
EOF;
......
......@@ -96,6 +96,7 @@ function &smarty($javascript = array(), $headers = array(), $pagestrings = array
$smarty = smarty_core();
$wwwroot = get_config('wwwroot');
$jswwwroot = json_encode($wwwroot);
$theme_list = array();
......@@ -163,7 +164,9 @@ tinyMCE.init({
button_tile_map: true,
{$tinymce_config}
language: '{$language}',
content_css : {$content_css}
content_css : {$content_css},
document_base_url: {$jswwwroot},
relative_urls: false
});
</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