cogA rendering transformation to transform series of characters into icons (emoticons and others)
TypeJAR
Developed by

XWiki Development Team

Rating
Rate!
0 Votes
LicenseGNU Lesser General Public License 2.1
Compatibility

XWiki 2.6RC1+

Description

Transforms some special characters representing icons into images. For example transforms the emoticon_smile characters into a smiley (:)).

Here are the default mappings:

CharactersResult
:)emoticon_smile
:(emoticon_unhappy
:Pemoticon_tongue
:Demoticon_grin
;)emoticon_wink
(y)thumb_up
(n)thumb_down
(i)information
(/)accept
(x)cancel
(!)error
(+)add
(-)delete
(?)help
(on)lightbulb
(off)lightbulb_off
(*)star

Customizations

It's possible to customize 2 things:

  • Change the icon used to represent one of the default mappings
  • Add new mappings so that other series of characters are recognized

To make those changes, edit WEB-INF/lib/xwiki.properties and look for keys starting with the rendering.transformation.icon. prefix.

For example if you wish to change the icon used to represent :) so that it uses emoticon_grin instead, you'd add or modify the following property like this:

rendering.transformation.icon.mappings = :) = emoticon_grin

The icons you can use and their names can be found in this Silk Icon Set Reference

If you wish to add a new mapping so that typing (h) generates a heart (heart), you'd add:

rendering.transformation.icon.mappings = (h) = heart

Prerequisites & Installation Instructions

This transformation is active by default so you should be able to use it right away.

If you wish to disable it or if someone disabled it and you need to re-activate it,  edit WEB-INF/xwiki.properties, look for a property named rendering.transformations and make sure it's uncommented and contains the value icon

For example:

rendering.transformations = macro, icon
Make sure you restart your XWiki instance for the change to take effect.
Created by Vincent Massol on 2011/12/09 13:09
    

Get Connected