====== Annotate Plugin ====== ---- plugin ---- description: Creates configurable annotation boxes that function like tooltips. The boxes open in place on mouseover, beneath the text being annotated, and close out-of-sight on the click of a button or mouseout. author : Myron Turner email : turnermm02@shaw.ca type : syntax lastupdate : 2019-03-28 compatible : Detritus, Elenor of Tsort, Frusterick Manners, Greebo,hogfather depends : conflicts : similar : tags : annotation, annotate, tooltip downloadurl: https://github.com/turnermm/annotate/zipball/master bugtracker : https://github.com/turnermm/annotate/issues sourcerepo : https://github.com/turnermm/annotate donationurl: screenshot_img : ---- ===== Installation ===== Install the plugin using the [[plugin:extension|Extension Manager]] or the download URL above, which points to latest version of the plugin. Refer to [[:Plugins]] on how to install plugins manually. ===== Examples/Usage ===== This plugin creates scrollable information boxes that open when the mouse cursor moves over the text that requires explanation, which is marked like a DokuWiki tooltip, with double dotted underlining, as in "HTML". The box stays open until the ''close'' button is clicked or until the user **double clicks** inside the box itself, or until another box is opened. The text for the annotation can be entered directly into the current page or imported from a DokuWiki page. The syntax for these techniques is described below. ===== Syntax ===== ==== The basic syntax ==== text<@anno:num>annotation text<@anno:[num;;class_name]>annotation ''num'' is a unique two digit number that identifies this annotation pair. The ''text'' is what is explained by ''annotation''. In the browser this ''text'' will be identified by a double dotted underline. Please note that the mark-up for the ''text'' and the markup for the ''annotation'' are side-by-side. ''class_name'' is the name of a class defined in the css file that can alter the characteristics of the annotation box. See the following section on [[#syntax]]. ==== Complete Syntax ==== 1. text<@anno:10>wiki text \\ 2. text<@anno:15>%%{{ns:page}}%% \\ 3. text<@anno:20>ns:pagewiki textns:page \\ 4. text<@anno:25>wiki textns:page \\ 5. text<@anno:35>ns:pagewiki text \\ 6. text<@anno:[40;;classname]>ns:pagewiki textns:page (''top'' and ''bottom'' are discretionary) \\ * ''text'': text to be annotated * ''wiki text'': the annotation entered directly into the current page * ''ns:page'': wiki page (namespace:page) to be loaded into the annotation from a file in the wiki * ''top'': marks off a header which will be loaded into the annotation from the specified wiki page * ''bottom'' marks off a footer which will be loaded into the annotation from the specified wiki page - In this form, the entire annotation will consist of the wiki text - In this form the entire annotation will consist of the page loaded into the annotation field from ''ns:page'' - In this form the wiki text will be preceded by a header and followed by a footer - In this form the annotation will consist of the wiki text followed by a footer - In this form the annotation will consist of a header and the wiki text - In this form,there is the opportunity to use a predefined class or to create user-defined annotation classes for your containers. There are six pre-defined classes: - ''annotation'': the default container, 120px deep; this is the class used when no other class is specified (i.e. when not using format number 6) - ''anno_deep'' : 160px deep - ''anno_narrow'' 120px deep - ''annotation_r'' - ''anno_narrow_r'' - ''anno_deep_r'' All of the predefined classes are 620px wide. The ''_r'' classes have the same dimensions as their namesakes but have rounded corners. These classes can be changed or your own classes can be defined. The annotation blocks will have scrollbars if the content exceeds the dimensions of the block. However, in the case of blocks with rounded corners, the rounded corners will be squared off for the scrollbars. ===== What can and cannot be included in the annotations ===== Most DokuWiki syntax can be included in the annotations with the exception of block level elements. The latter includes code blocks, file blocks, geshi code blocks, and code snippets. When these are included, they end up outside the annotation block. The annotations can include images, links, tables, ordered and unordered lists, headlines, and typographic markup, such as bold, italic, superscript, etc. While tables, lists and headlines are block level elements, the plugin re-configures them for inclusion in the annotation field. This means that for these forms, there might be some differences from the styles of your template. ===== Lists ===== Lists should be prefaced by ''[List]'' and ended with ''[tsiL]'': [List] * item one * item two * etc. . . [tsiL] ===== Newlines and Paragraphs===== Leaving a blank line between lines does not automatically insert a newline. To sart a new line or paragraph, you must use the dokuwiki double backslash. So this: line 1 line 2 will give you this line 1 line2 To start ''line 2'' on a new line, you must use instead: line 1\\ line 2 To make ''line 2'' the start of a new paragraph, you must use this: line 1\\ \\ line 2 ===== Development ===== === Change Log === {{rss>https://github.com/turnermm/annotate/commits/master.atom date count=10}} ===== Discussion ===== === Bugs and Issues === Use the DokuWiki forum or annotate's issues on github (see the ** [[#annotate_plugin|Report Bugs]] ** link above).