DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:colortag

colortag Plugin

Compatible with DokuWiki

2010-11-07, 2011-04-22, 2011-05-25, 2012-01-25a

plugin Adds <colortag> syntax

Last updated on
2019-03-26
Provides
Syntax
Repository
Source

This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.

Tagged with tags

Installation

Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.

Examples/Usage

From this code

* <colortag char=+>brown,black,brown</colortag> 2×100Ом
* <colortag>brown,black,red</colortag> 1×1кОм
* <colortag>orange,orange,red</colortag> 1×3.3кОм
* <colortag>brown,black,orange</colortag> 2×10кОм
* <colortag>red,magenta,red</colortag> 1×2.7кОм
* <colortag>yellow,magenta,brown</colortag> 1×470Ом

one may get this picture

the render

Syntax

<colortag[attributes]>TAG[,TAG,...]</colortag>

  • TAG is either a color, or color:char, or color:char:color
    • color can be given (as for any HTML color field) by:
      • black — name
      • #1A2B3C — 6-digit hex
      • #1AF — 3-digit hex
      • the last color, if any, is the foreground one
    • char is any good char to show (say, &bull;)
  • attributes are now unused.

Configuration and Settings

  • One may edit style.css file in the plugin's directory to customize the render.
    Actually, only the table.colortag specs (and below) are in use.

Development

Change Log

  • 2012-05-18
    • color:char and color:char:color forms added:
      • <colortag>green:&bull;</colortag>
      • <colortag>green:&bull;:lime</colortag>
  • 2011-03-25
    • verification of color value has been added
  • 2011-03-14
    • Initial release

Known Bugs and Issues

  • No verification is done on the color value. This may lead to code injection.

ToDo/Wish List

  • make use of attributes to set color of the border lines.
  • filter the color value to prevent abuse.
  • tune up the style.css to reduce the vertical size of the resulting boxen.
  • implement (via attributes?) an automated way of mapping some device values to respective color codes (resistors, diodes, etc).
    Something like <colortag resistor=4.7kOhm></colortag>.

FAQ

  • [none]

Discussion

  • none
plugin/colortag.txt · Last modified: 2023-04-26 18:52 by Aleksandr

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