DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:cellbg

Cell Background Plugin

Compatible with DokuWiki

  • 2024-02-06 "Kaos" unknown
  • 2023-04-04 "Jack Jackrum" yes
  • 2022-07-31 "Igor" yes
  • 2020-07-29 "Hogfather" no

plugin Allows user-defined background colored cells in tables

Last updated on
2013-10-09
Provides
Syntax
Repository
Source
Conflicts with
block, note, sortablejs

:!: To be uninstalled before updating to the latest Hogfather release (if not you get a blank page) but surprisingly by reinstalling it afterwards, it works well (tested on 2 wikis) with no more error log on web server.

Download and Installation

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

Syntax and Usage

A background color is introduced by @ and ended by :. You can use all names and color codes from HTML. If you don't specify a color, yellow is used. See examples below:

Examples

This code:

^  Header 1         ^  Header 2  ^  Header 3        ^
|  @lightgreen:**Span**         ||                  |
|  @#6495ed:Ligne 1 |  Oui       |  Oui, à valider  |
|  Ligne 2          |  Oui       |  @orange: Oui    |
|  @:Ligne 3        |  Oui       |  @red:Non        |

looks like:
example 1 preview

This one:

|  @palegreen:Validé  |  @orange:À valider  |  @red:Non fonctionnel  |

looks like:
exemple 2 preview

Wikis using cellbg

Features

  • Uses HTML color codes and names HTML Color Code Chart
  • Works with other table formatting (alignment, bold, …)

Limitations

  • Doesn't work with header lines (^ character), so just don't use them if you want a specific color for these lines
  • May not work with plugins introducing a different syntax than the DokuWiki one for tables
  • If “@…:” pattern is found out of a table, it might disable other syntax inside it (not sure about that).

How it works

It's a hack that edit previously formatted text :

  • detect if in a table by looking for a <td…> markup in the previously formatted text ($renderer→doc) ;
  • edit the formatted text and add bgcolor= inside the previous <td> markup ;
  • if not in a table : add the text in the formatted text as is.

Changes

Bugs

Plugin fails with wrap-Plugin

Problem description and solution: https://github.com/dr4Ke/cellbg/pull/17

@: syntax

@: syntax don't work with DokuWiki on Debian lenny : 0.0.20080505-4+lenny1
Bug : https://github.com/dr4Ke/cellbg/issues/issue/1

Automatic installation on 20080505 fails

Automatic installation on 20080505 fails with :

The plugin manager was unable to decompress the downloaded file. This maybe as a result of a bad download, in which case you should try again; or the compression format may be unknown, in which case you will need to download and install the plugin manually.

Manual installation works fine. Bug : https://github.com/dr4Ke/cellbg/issues/issue/2

Compatibility Issues

No conflict with Sortablejs plugin v. 2016-05-26. (php 5.3.5, Windows, DW Release 2016-06-26a “Elenor of Tsort” — Florin C. 2019-03-23 19:30

– Please apply the patch from Richard MICHALOWICZ below. Otherwise the plugin bureaucracy will be broken under 2013-12-08 „Binky“. – Alois Hockenschlohe (2014/01/16)

In order to solve the problem related with the 2013-05-10a “Weatherwax” (ReferenceError: addInitEvent is not defined) you must change in the file <dokuwiki_install_dir>/lib/plugins/cellbg/script.js the last line as this:

  • old line: addInitEvent(plugin_cellbg_toolbar_picker);
  • new line: jQuery(plugin_cellbg_toolbar_picker);

That solved the Error and the compatibility between cellbg and the new Jquery motor is OK.
Richard MICHALOWICZ (2013/07/24)

Tried in “Weatherwax” (Release 2013-05-10) and I've nothing to report so far, it seems ok : — Adam Douglas 2013/07/10 09:32

Tried in “Adora Belle”, and I've nothing to report so far, it seams ok : — Andy 2012/11/30 01:03

Tried in “Anteater”, and I've nothing to report so far, it seams ok : — antoniomch 2011/04/05 13:11

Tried in “Rincewind” and I've nothing to report so far, it seems ok : — Philippe jourdren 2011/12/14 07:45

plugin/cellbg.txt · Last modified: 2024-01-01 20:50 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