DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:divalign2

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
plugin:divalign2 [2021-01-31 10:04] jaddawynplugin:divalign2 [2023-06-09 14:51] urs
Line 1: Line 1:
-====== DivAlign2 Plugin ====== 
- 
----- plugin ---- 
-description: Align content left, right, center, or justify 
-author     : Luis Machuca Bezzaza 
-email      : lambalicious [at] tuta [dot] io 
-type       : syntax 
-lastupdate : 2020-06-11 
-compatible : "Rincewind", "Weatherwax", "Binky", "Hrun", "Frusterick Manners", "Detritus", "Elenor of Tsort", "Greebo", Hogfather 
-depends    :  
-conflicts  : divalign 
-similar    : divalign, wrap 
-tags       : style, typography, odt, toolbar 
- 
-downloadurl: https://notabug.org/lmachucabezzaza/dw-plugin-divalign2/archive/master.zip 
-bugtracker : https://notabug.org/lmachucabezzaza/dw-plugin-divalign2/issues 
-sourcerepo : https://notabug.org/lmachucabezzaza/dw-plugin-divalign2/ 
-donationurl: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=T44AQDXJQJTJQ&source=url 
-demourl:  http://ryan.gulix.cl/tests.doku/current_/doku.php/divalign2 
----- 
- 
-The **divalign2 plugin** provides a means to specify [[wp>Typographic_alignment|paragraph alignment]] in DokuWiki pages, using nothing more than CSS directives. 
- 
-Some years ago, Jason Byrne contributed with his first plugin, [[plugin:divalign|divalign]] which allowed a simple, unobtrusive syntax to use a feature that the original DokuWiki engine lacked: [[wp>Typographic_alignment|paragraph alignment]]. At some point at Dec. 2008, in order to implement some fixes and suggestions, after failing to contact the author to provide some fixes and suggestions, I decided to implement a fork. Here are the results. 
- 
-Feel free to use and comment (see =>[[#Discussion]]). 
- 
-===== Usage ===== 
-Simple syntax used to align text or images. 
- 
-:!: Note that you can achieve the same results by using the [[:plugin:wrap|wrap plugin]]. 
- 
-==== Download and Installation ==== 
- 
-Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually. 
- 
-The link above will always point to the <del>latest stable</del> current **release candidate**. Should you need an older, archived version, or a download right out from ''master'', check the plugin's webpage which contains the required links: http://ryan.gulix.cl/dw/desarrollo/dokuwiki/ . 
- 
-:!: **Note**: As of June 2020, plugin is in release candidate stages to check compatibility with Hogfather. If you can test the plugin and report back, feedback is welcome! 
- 
-:!: **Note**: Versions of Dokuwiki previous to //Rincewind// are no longer supported. 
- 
- 
-==== Syntax ==== 
- 
-Align Left:   
- 
-  #;; 
-  This is aligned left. 
-  #;; 
- 
-Align Right: 
- 
-  ;;# 
-  This is aligned right. 
-  ;;# 
- 
-Align Center: 
- 
-  ;#; 
-  This is aligned center. 
-  ;#; 
- 
-Align Justify: 
- 
-  ### 
-  This text is justified. 
-  ### 
- 
- 
- 
-:!: Previous versions of this plugin had a "Misfeature" that allowed to align multiple paragraphs at once by wrapping the first and last of them with the syntax. This is no longer supported. 
- 
- 
- 
-Not working as expected, Example :  
-;#; 
-Nothing Happens, this text is not centralize!! 
-;#; 
- 
-Also when trying to align headers 
 #;; #;;
-== Will you marry me .. Tuli :-) == +This is aligned left.
 #;; #;;
- 
-  - The markup has to be on separate lines 
-  - You cannot have markup in headers 
-==== Demo ==== 
- 
-**Want to see the plugin in action?** http://ryan.gulix.cl/tests.doku/current_/doku.php/divalign2 
- 
- 
-=====Other Details===== 
- 
-====Edit Toolbar==== 
- 
-The plugin now incorporates a Toolbar Picker Button for the alignment mode. You click it, and are presented with four buttons to set left, center, right or justified alignment. Thanks to //faraday// for new, sleeker icons integarted in the divalign-2.3 versions and above. 
- 
-=== script.js === 
-The ''script.js'' packaged with this plugin no longer displays the picker icons.  If this  is your case, use this as a replacement: 
-<file javascript script.js> 
- 
-if(window.toolbar!=undefined){ 
-   var align_da2_arr={ 
-  '#;;\nParagraph\n#;;\n': 'pleft.png', 
-  ';#;\nParagraph\n;#;\n':  'pcenter.png', 
-  ';;#\nParagraph\n;;#\n':  'pright.png', 
-  '###\nParagraph\n###\n':  'pjustify.png'}; 
-  toolbar[toolbar.length] = { 
-                   "type":"picker", 
-                    "title": "Alignment", 
-                    "icon" : "../../plugins/divalign2/images/pleft.png", 
-                    "key"  : "a", 
-                    "list" : align_da2_arr, 
-                    "icobase" : "../../lib/plugins/divalign2/images",                     
-                    /* In some configurations, you may have to remove "lib" from path: 
-                         "icobase" : "../../plugins/divalign2/images" 
-                    */                     
-                    };  
-  } 
- 
-/* end of divalign2/script.js */ 
-</file> 
-In addition, you should probably remove ''/divalign2/action.php'', which duplicates the picker toolbar item with the same problems as the original ''script.js''. 
- --- [[user>turnermm|Myron Turner]] //2016-09-20 03:05// 
-====Browser Support==== 
- 
-Any browser that supports CSS will align the content correctly. Not much of an issue here. 
- 
-ODT export should render with the correct alignment. 
- 
-Text renderers and devices happily ignore this plugin. 
- 
-====Syntax details==== 
- 
-Because it uses the same syntax, this plugin is marked as both **similar** and **conflicting** with the original Divalign. All tags are the same and have similar requirements except where noted below. 
- 
-Unlike the original plugin, ''divalign2'' requires that the enter/exit syntax take place at the beginning/end of their lines, respectively. Thus, the following should not work: 
- 
-  ;;# 
-  This text will not be aligned right. ;;# 
- 
- 
-This plugin may interfere with other plugins that float content (such as //gchart//). This is untested however. 
- 
-====Changelog==== 
- 
-See the repository page or [[https://notabug.org/lmachucabezzaza/dw-plugin-divalign2/raw/master/divalign2/ChangeLog|here]]. 
- 
- 
-==== Source Code ==== 
- 
-Unzipping the file from the download link above will give you the source code, as will do checking the source repo. It is free, in the GPL definition of the word. 
- 
-===== Discussion ===== 
- 
-:?: [[plugin:divalign2:discussion|Ask questions here]]. Also includes the discussion archive before this revision. 
- 
- 
plugin/divalign2.txt · Last modified: 2023-10-30 22:36 by Klap-in

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki