README
1bureaucracytoolbar plugin for DokuWiki
2
3
4All documentation for this plugin can be found at
5https://github.com/edwardcodelab/bureaucracytoolbar
6
7If you install this plugin manually, make sure it is installed in
8lib/plugins/bureaucracytoolbar/ - if the folder is called different it
9will not work!
10
11Please refer to http://www.dokuwiki.org/extensions for additional info
12on how to install extensions in DokuWiki.
13
14
15
16----
17Copyright (C) dodotori <dodotori@localhost>
18
19This program is free software; you can redistribute it and/or modify
20it under the terms of the GNU General Public License as published by
21the Free Software Foundation; version 2 of the License
22
23This program is distributed in the hope that it will be useful,
24but WITHOUT ANY WARRANTY; without even the implied warranty of
25MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26GNU General Public License for more details.
27
28See the LICENSING file for details
29
README.md
1### Bureaucracy Toolbar Plugin for DokuWiki
2
3The Bureaucracy Toolbar plugin enhances DokuWiki's [Bureaucracy plugin](https://www.dokuwiki.org/plugin:bureaucracy) by adding a simple toolbar above forms, allowing users to easily insert common Dokuwiki syntax (e.g., bold, italic, links) into textarea fields. This is particularly useful for forms with rich text inputs, such as those for creating pages, emails, or structured content.
4
5#### Features
6- **Buttons for Common Syntax**: Includes buttons for:
7 - **Bold** (`**text**`)
8 - *Italic* (`//text//`)
9 - __Underline__ (`__text__`)
10 - `Code` (`<code>text</code>`)
11 - List Item (` * text`)
12 - Link (`[[text]]`)
13- **Smart Textarea Targeting**: When a button is clicked, the syntax is inserted into the currently focused textarea (or the last focused one) in the bureaucracy form. This supports forms with multiple textareas without always defaulting to the first.
14- **Selection Handling**: If text is selected in the textarea, the syntax wraps around it. The cursor is then repositioned inside the inserted markup for easy editing.
15- **Styling**: The toolbar has basic CSS for a clean, modern look (light gray background, rounded corners).
16
17#### Installation
181. Download the plugin files (`syntax.php` and `script.js`).
192. Place them in your DokuWiki's plugin directory: `lib/plugins/bureaucracytoolbar/`.
203. Ensure the Bureaucracy plugin is already installed and enabled, as this toolbar depends on it.
214. Refresh your DokuWiki plugin manager to activate it.
22
23#### Usage
24To add the toolbar to a page with a bureaucracy form:
25- Insert the syntax `<bureaucracytoolbar>` anywhere on the page (typically above the form definition for better placement).
26