/* DokuWiki MoaiEditor Mikio.js file Version : 0.5 (May 5, 2026) Author : MoaiTools License : GPL 3 (http://www.gnu.org/licenses/gpl.html) */ /* This class extends 'MoaiEditor.Template' class and allows to override some methods to support a specific template, in this case 'Mikio'. This is the list of methods you generally can override to support your template: detectTemplate addStartButton find_ElementsToHide find_Messages() find_Toolbar find_Pagetools find_EditSummary find_Form find_Textarea find_EditButtons See 'templates/default.js' to understand each of these methods. See 'README' to learn how to support a new template. */ MoaiEditor.Template_mikio = class extends MoaiEditor.Template { detectTemplate() { if (DOKU_TPL.endsWith ('tpl/mikio/')) return true; return false; } find_Messages() { // Find the displayed messages (info, error, success, notify) usually rendered by inc/html.php -> html_msgarea(). // Some templates like bootstrap3 implement their own message rendering function and don't use html_msgarea(). // In order to check how (and if) your template's messages are being displayed in this editor, you can simulate // fake messages by either: // a) Adding '&fakemsg' to the browser's URL while in edit mode. // b) Set the MOAIED_FAKE_MESSAGES constant to true in: lib/plugins/moaieditor/action.php var query = ""; var container = "#dokuwiki__content "; query += container + "div.error, "; query += container + "div.info, "; query += container + "div.success, "; query += container + "div.notify "; var messages = document.body.querySelectorAll(query); return messages; } }; // End Class