Commit be02dbe3 authored by Pablo Rauzy's avatar Pablo Rauzy
Browse files

fix missing arg bug

parent 469147cf
......@@ -174,7 +174,7 @@ function list_files ($ext) {
}
// Print TinyMCE setup JavaScript
function tinymce_setup ($mode = 'page') {
function tinymce_setup ($mode, $file) {
global $config, $settings, $pages, $groups;
?><script>
tinymce.init({
......@@ -397,7 +397,7 @@ function render ($file, $mode='edit', $entry_dt='NEW') {
});
document.getElementById('entry_content').parentNode.style.display = 'none';
</script>
<?php tinymce_setup('entry'); ?>
<?php tinymce_setup('entry', $file); ?>
</div>
<?php else: // page ?>
<div id="main">
......@@ -411,7 +411,7 @@ function render ($file, $mode='edit', $entry_dt='NEW') {
</form>
<script src="https://unpkg.com/tinymce@5.6.1/tinymce.min.js"></script>
<script>document.getElementById('page_form').style.display = 'none';</script>
<?php tinymce_setup('page'); ?>
<?php tinymce_setup('page', $file); ?>
<article id="entries_menu">
<a href="<?php echo CIGALA_PHP,'?entry=',$file; ?>:NEW">new entry</a>
</article>
......
Supports Markdown
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