承接 jelix/wikirenderer-plugin 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

jelix/wikirenderer-plugin

最新稳定版本:v1.7.4

Composer 安装命令:

composer require jelix/wikirenderer-plugin

包简介

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

README 文档

README

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

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

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

installation

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

In your project:

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.

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

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.

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

   $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.

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.

In this file you should have a class superwiki_to_xhtml inheriting from WikiRendererConfig or the class of another rule.

For more information, browse the Wikirenderer Documentation.

统计信息

  • 总下载量: 2.73k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: LGPL-2.1
  • 更新时间: 2015-06-05