2017 © Pedro Peláez
 

jelix-module wikirenderer-plugin

a plugin for Jelix or Castor to render wiki content in a template

image

jelix/wikirenderer-plugin

a plugin for Jelix or Castor to render wiki content in a template

  • Thursday, September 22, 2016
  • by laurentj
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1,155 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 8 % Grown

The README.md

This is a plugin for jTpl or Castor, the template engine used by Jelix., (*1)

This plugin allows to render wiki content in a template. It uses the class jWiki (see lib/), based on the library WikiRenderer., (*2)

This plugin is for Jelix 1.7.x and higher. See the jelix/jelix repository to see its history before Jelix 1.7., (*3)

installation

Install it by hands like any other Jelix plugins, or use Composer if you installed Jelix 1.7+ with Composer., (*4)

In your project:, (*5)

composer require "jelix/wikirenderer-plugin"

Usage in a template

 <div>
    {$mywikicontent|wiki}
 </div>

jWiki Usage

jWiki is a class transforming wiki text to other formats. XHTML for example. This class inherits from Wikirenderer version 3.1., (*6)

In order to transform, Wikirenderer needs some precise objects, which grouped together become the //transform rules//., (*7)

There are a bunch of //transform rules// already bundled by WikiRenderer. For instance, wr3_to_xhtml allows to transform wiki (wr3 syntax) into XHTML. It is also possible to transform dokuwiki code into XHTML, or mediawiki into docbook. All combinations are possible. you only need to give or develop the good set of transform rules., (*8)

To use jWiki, just instantiate it with a //transform rules// name. If you want to transform wiki wr3 into XHTML, just do:, (*9)

   $wr = new jWiki('wr3_to_xhtml');
   $xhtml = $wr->render($wiki_text);

You can add your own set in your_app/plugins/wr_rules/. Note: remember to activate app:plugins repository in your configuration, if you intend to do so., (*10)

If you store your own //transform rules// into your_app/plugins/wr_rules/, each //transform rules// should be in its own directory, like any jelix plugins. So, if you have a "superwiki_to_xhtml" rule, you have to store its source code into the file your_app/plugins/wr_rules/superwiki_to_xhtml/superwiki_to_xhtml.rule.php., (*11)

In this file you should have a class superwiki_to_xhtml inheriting from WikiRendererConfig or the class of another rule., (*12)

For more information, browse the Wikirenderer Documentation., (*13)

The Versions

22/09 2016

dev-master

9999999-dev http://jelix.org

a plugin for Jelix or Castor to render wiki content in a template

  Sources   Download

LGPL-2.1

The Requires

 

wiki castor jelix jtpl

28/05 2016

v1.7.1

1.7.1.0 http://jelix.org

a plugin for Jelix or Castor to render wiki content in a template

  Sources   Download

LGPL-2.1

The Requires

 

wiki castor jelix jtpl

06/06 2015

v1.7.0

1.7.0.0 http://jelix.org

a plugin for Jelix or Castor to render wiki content in a template

  Sources   Download

LGPL-2.1

The Requires

 

wiki castor jelix jtpl