block Plugin

Compatible with DokuWiki

  • 2012-01-25 "Angua" yes
  • 2011-05-25 "Rincewind" yes
  • 2010-11-07 "Anteater" yes

plugin Create highly configurable boxes for text and image.

Last updated on
2011-04-07
Provides
Syntax
Repository
Source

Similar to box, wrap

Installation

Install the plugin using the Plugin Manager and 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 has a toolbar icon which pops up a window with which you design your box, including border styles and colors, text color and box color, the width of the box in percentages, and the position of the box on the page.

You can either start by selecting your text and then designing your box or you can create your box and add text to it. You can also include images in these boxes; however, image position depends on the Dokuwiki markup.

Syntax

Syntax is taken care of by the pop-up design tool.

Main Dialog Window of Design Tool

Syntax Specification

/**
 *  <block width:alignment:background-color,text-color;border;font-family/font-size>
 *   text
 *  </block>
 *   width:  percent of window size
 *   alignment:  number of pixels from left margin, (0 or 'c' centers block), 'r' floats right
 *   border: CSS style: width type color
 *   font-family:  font name
 *   font size: specify points or pixels
 *
 *   Example:  
 *  <block 80:0:rgb(102, 51, 255);rgb(255, 255, 153);2px dashed rgb(255, 102, 255);Comic Sans MS /10pt> 
 *
 *  This creates a block 80% of page width,centered on page, background of block is rgb(102, 51, 255),
 *  text-color is rgb(255, 255, 153); the box border is 2px wide, dashed, its color is rgb(255, 102, 255).
 *  The font is 10pt Comic Sans MS.
 *   
 *  Only width and alignment are required. In this case, if alignment is 'c' or 'r', then you must follow it with a colon:  'c:'
*/
/**
* Default:
* <block 80:0:white;black;4px solid black;arial,sans-serif/9pt;>text</block>
* width: 80%
* alignment: centered
* background-color: white
* text-color: black
* border: 4px solid black
* font: 9pt arial,sans-serif
*/

FAQ

Discussion

I has an error when I clicked the menu button

I had to change the line of the file “script.js”, from

     var url = encodeURI('lib/plugins/block/exe/block.php');

to

     var url = encodeURI('lib/plugins/block/exe/block.php?');
Thank you. I've updated the plugin.

Rounded Corners

Are there any plans to incorporate rounded corners as an option for borders (this may require the plugin to also add padding, to ensure the border does not overlap the text)? — AshtagonAshtagon

London, UK
2012/03/21 15:45

There is now a version of the block plugin which has a setting for rounded corners.

plugin/block.txt · Last modified: 2012/04/12 01:52 by turnermm
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 3.0 Unported
Imprint Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki
WikiForumIRCBugsGitXRefTranslate