From a98e5e45827d01d2ad2cf64978fd60caa47bb259 Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Tue, 8 Jun 2021 23:34:49 +0200 Subject: [PATCH] Bugfix for EOF --- .gitignore | 2 + bl-plugins/easymde/plugin.php | 90 +++++++++++++-------------- bl-plugins/tinymce/plugin.php | 98 +++++++++++++++--------------- bl-plugins/visits-stats/plugin.php | 72 +++++++++++----------- bl-plugins/welcome/plugin.php | 44 +++++++------- 5 files changed, 154 insertions(+), 152 deletions(-) diff --git a/.gitignore b/.gitignore index 878fac3f..e57370ed 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,5 @@ bl-themes/tagg bl-themes/small bl-themes/future-imperfect bl-themes/social-network +Dockerfile +conf/* \ No newline at end of file diff --git a/bl-plugins/easymde/plugin.php b/bl-plugins/easymde/plugin.php index 415ce955..242f0a70 100644 --- a/bl-plugins/easymde/plugin.php +++ b/bl-plugins/easymde/plugin.php @@ -68,53 +68,53 @@ class pluginEasyMDE extends Plugin { $toolbar = Sanitize::htmlDecode($this->getValue('toolbar')); $pageBreak = PAGE_BREAK; - return << - // Function required for Bludit - // Returns the content of the editor - function editorGetContent() { - return easymde.value(); - } +return << + // Function required for Bludit + // Returns the content of the editor + function editorGetContent() { + return easymde.value(); + } - // Function required for Bludit - // Insert HTML content at the cursor position - function editorInsertContent(html, type='') { - var text = easymde.value(); - if (type == 'image') { - easymde.value(text + "![$langImage]("+filename+")" + "\\n"); - } else { - easymde.value(html + "\\n"); - } - easymde.codemirror.refresh(); - } + // Function required for Bludit + // Insert HTML content at the cursor position + function editorInsertContent(html, type='') { + var text = easymde.value(); + if (type == 'image') { + easymde.value(text + "![$langImage]("+filename+")" + "\\n"); + } else { + easymde.value(html + "\\n"); + } + easymde.codemirror.refresh(); + } - var easymde = new EasyMDE({ - element: document.getElementById("editor"), - status: false, - toolbarTips: true, - toolbarGuideIcon: true, - autofocus: false, - placeholder: "", - lineWrapping: true, - autoDownloadFontAwesome: false, - indentWithTabs: true, - tabSize: $tabSize, - spellChecker: $spellCheckerEnable, - toolbar: [$toolbar, - "|", - { - name: "pageBreak", - action: function addPageBreak(editor){ - var cm = editor.codemirror; - output = "$pageBreak"; - cm.replaceSelection(output); - }, - className: "bi-crop", - title: "Page break", - }] - }); + var easymde = new EasyMDE({ + element: document.getElementById("editor"), + status: false, + toolbarTips: true, + toolbarGuideIcon: true, + autofocus: false, + placeholder: "", + lineWrapping: true, + autoDownloadFontAwesome: false, + indentWithTabs: true, + tabSize: $tabSize, + spellChecker: $spellCheckerEnable, + toolbar: [$toolbar, + "|", + { + name: "pageBreak", + action: function addPageBreak(editor){ + var cm = editor.codemirror; + output = "$pageBreak"; + cm.replaceSelection(output); + }, + className: "bi-crop", + title: "Page break", + }] + }); - - EOF; + +EOF; } } \ No newline at end of file diff --git a/bl-plugins/tinymce/plugin.php b/bl-plugins/tinymce/plugin.php index 4071d9f8..ed3d6c91 100644 --- a/bl-plugins/tinymce/plugin.php +++ b/bl-plugins/tinymce/plugin.php @@ -90,60 +90,60 @@ class pluginTinymce extends Plugin { $skin = 'oxide-dark'; } - return << +return << - // Function required for Bludit - // Returns the content of the editor - function editorGetContent() { - return tinymce.get('editor').getContent(); - } + // Function required for Bludit + // Returns the content of the editor + function editorGetContent() { + return tinymce.get('editor').getContent(); + } - // Function required for Bludit - // Insert HTML content at the cursor position - function editorInsertContent(content, type='') { - if (type == 'image') { - var html = ''; - } else { - var html = content; - } - tinymce.activeEditor.insertContent(html); - } + // Function required for Bludit + // Insert HTML content at the cursor position + function editorInsertContent(content, type='') { + if (type == 'image') { + var html = ''; + } else { + var html = content; + } + tinymce.activeEditor.insertContent(html); + } - tinymce.init({ - selector: "#editor", - auto_focus: "editor", - element_format : "html", - entity_encoding : "raw", - skin: "$skin", - schema: "html5", - statusbar: false, - menubar:false, - branding: false, - browser_spellcheck: true, - pagebreak_separator: PAGE_BREAK, - pagebreak_split_block: true, - paste_as_text: true, - remove_script_host: false, - convert_urls: true, - relative_urls: false, - valid_elements: "*[*]", - cache_suffix: "?version=$version", - $document_base_url - plugins: ["$plugins"], - toolbar1: "$toolbar1", - toolbar2: "$toolbar2", - language: "$lang", - content_css: "$content_css", - init_instance_callback: function(editor) { - editor.on("keydown", function(event) { - keypress(event); - }); - } + tinymce.init({ + selector: "#editor", + auto_focus: "editor", + element_format : "html", + entity_encoding : "raw", + skin: "$skin", + schema: "html5", + statusbar: false, + menubar:false, + branding: false, + browser_spellcheck: true, + pagebreak_separator: PAGE_BREAK, + pagebreak_split_block: true, + paste_as_text: true, + remove_script_host: false, + convert_urls: true, + relative_urls: false, + valid_elements: "*[*]", + cache_suffix: "?version=$version", + $document_base_url + plugins: ["$plugins"], + toolbar1: "$toolbar1", + toolbar2: "$toolbar2", + language: "$lang", + content_css: "$content_css", + init_instance_callback: function(editor) { + editor.on("keydown", function(event) { + keypress(event); }); + } + }); - - EOF; + +EOF; } } \ No newline at end of file diff --git a/bl-plugins/visits-stats/plugin.php b/bl-plugins/visits-stats/plugin.php index e0eef464..33d117ce 100644 --- a/bl-plugins/visits-stats/plugin.php +++ b/bl-plugins/visits-stats/plugin.php @@ -50,44 +50,44 @@ class pluginVisitsStats extends Plugin { $labelVisits = $L->g('Visits'); $labelUnique = $L->g('Unique'); - return << -

$label

- - +return << +

$label

+ + - - EOF; + }] + } + } +}); + +EOF; } // Plugin form for settings diff --git a/bl-plugins/welcome/plugin.php b/bl-plugins/welcome/plugin.php index dbd9d50a..e856e7ce 100644 --- a/bl-plugins/welcome/plugin.php +++ b/bl-plugins/welcome/plugin.php @@ -25,29 +25,29 @@ class pluginWelcome extends Plugin { $labelGoodEvening = $L->g('good-evening'); $labelGoodNight = $L->g('good-night'); - return << -

Welcome

- +return << +

Welcome

+ - - EOF; + +EOF; } } \ No newline at end of file