1 MoaiEditor plugin for DokuWiki 2 ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ 3 4Documentation and source code 5‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ 6 Documentation, source code and explanatory videos for this plugin 7 can be found at: https://moaitools.org/dokuwiki/plugins/moaieditor 8 9Instalation 10‾‾‾‾‾‾‾‾‾‾‾ 11 If you install this plugin manually, make sure it is installed in 12 lib/plugins/moaieditor/ - if the folder is called different it 13 will not work! 14 15 Please refer to http://www.dokuwiki.org/extensions for additional 16 info on how to install extensions in DokuWiki. 17 18Instructions for supporting other templates 19‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ 20 0. If MoaiEditor's toggle button is not showing up in the Doku- 21 wiki editing page, it is because it had trouble locating some 22 of the HTML elements it needs in order to work. So, before 23 anything else, open the browser's console to see the error. 24 Most probably it will tell you that it could not locate certain 25 element. Or it might throw an error because it could not parse 26 the content of an element. After you know the issue, proceed 27 with the following steps. 28 29 1. Start by copying any of the existing JS template files located 30 in the 'templates/' directory of the plugin. For example copy 31 'sprintdoc.js' and rename it to something like 'mytemplate.js'. 32 The only JS file in that directory you should NOT use as a 33 starting point is 'default.js'. 34 35 2. Modify the contents of the file according to what it is explained 36 in the comments of said file. 37 38 3. In 'script.js': 39 (a) Add the following line to the start of the script: 40 /* DOKUWIKI:include templates/mytemplate.js */ 41 (be sure to surround the line by slashes and asterisks 42 like the other ones) 43 (b) Add your chosen filename to the 'moaiEditor_templates' 44 array. For example: 'mytemplate'. 45 46 4. Optionally add a CSS file to the 'templates/' folder with the 47 same name as your other file. For example: 'mytemplate.css'. 48 This is only necesary if you want to fine-tune the look of 49 the editor to match your template. 50 51---- 52 53Copyright (C) 2026 MoaiTools <info@moaitools.org> 54 55This program is free software; you can redistribute it and/or modify 56it under the terms of the GNU General Public License as published by 57the Free Software Foundation; either version 2 of the License, or 58(at your option) any later version. 59 60This program is distributed in the hope that it will be useful, 61but WITHOUT ANY WARRANTY; without even the implied warranty of 62MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 63GNU General Public License for more details. 64 65You should have received a copy of the GNU General Public License along 66with this program; if not, write to the Free Software Foundation, Inc., 6751 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 68 69 70