====== Snippeter Plugin ====== ---- plugin ---- description: Add document snippets into an existing page author : Andreas Eisenreich email : andreas.eisenreich@posteo.net type : action lastupdate : 2024-02-13 compatible : Rincewind, Angua, Adora Belle, Ponder Stibbons, Hrun, Detritus, Elenor of Tsort, Frusterick Manners, Greebo, Hogfather, Igor, Jack Jackrum, Kaos depends : conflicts : similar : snippets tags : namespace, editor, snippets downloadurl: https://github.com/geco2/snippeter/archive/master.zip bugtracker : https://github.com/geco2/snippeter/issues sourcerepo : https://github.com/geco2/snippeter donationurl: https://flattr.com/profile/geco2 ---- ===== Description ===== This plugin adds a new button to editor toolbar. When clicking on it a popup shows up, showing a list of page templates which can be inserted into the editor window. The list of templates is defined using a special configureable namespace which contains pages which could be used as templates. ===== Installation ===== Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually. The local plugin directory must have the same name as the plugin is named, otherwise the plugin won't work properly. It seems to be necessary in some cases to reset DokuWikis cache after the manual installation. Please reset DokuWiki's cache: either press the save button in the [[:plugin:config|Configuration Manager]] page or touch the file ''conf/local.php''. ===== Examples/Usage ===== ==== Configuration ==== After successful installation you will find an additional section in the wiki's [[plugin:config|Configuration Manager]] called "snippeter". Within that section you can configure the namespace you want to use for your snippets. The plugin provides a shortcut for each page created in that namespace. ==== Create snippets ==== In general you can use any wiki page placed in the namespace you configured for snippeter. To add an icon to identify the snippet within the editor toolbar, you have to add the picture you plan to use using the dokuwiki media manager right within the snippet page. NOTE: Snippeter only supports PNG (.png) files in the current version. This might be changed in the future. Please refresh dokuwiki's cache to see your new icon! (touch the file conf/local.php) Valid Example: {{ :snippets:phone16.png |}} ==== Call: - ==== {{tag>}} * **Person:** * **Time:** **Notes** * ---- ==== Usage ==== Snippeter create a shortcut within the default editor toolbar (the "+" icon). This icon will open up an overview of your snippets. Choosing one of them with a click on the related icon will insert your snippet without the media manager information for the icon on the current cursor position within your open wiki page. ===== Development ===== === Changelog === A complete changelog is available [[https://github.com/geco2/snippeter/commits|here]]. {{rss>https://github.com/geco2/snippeter/commits/master.atom date}} ===== FAQ ===== **I added a customized icon for my snipped, but snippeter still provide the default one in the toolbar.** Please reset DokuWikis cache while touch the file conf/local.php or press the save button within the [[plugin:config|Configuration Manager]] page. ===== Discussion =====