사용자 도구

사이트 도구


wiki:plugins

문서의 이전 판입니다!


plugins

Box plugin Syntax

A simple box:

<box> the box contents </box>

Some more complex boxes

<box 80% round orange|a title> the box contents</box>
<box 50% left blue>the box contents</box|a caption>
<box 60% round #f99 #fc9 #fcc #f60|title>the box contents</box|caption>

a title

the box contents
the box contents

a caption

title

the box contents

caption

The full syntax:

<box width classes colours | title text> contents text </box>

  • width — any legal CSS width value
  • classes — any number of classes which use the styles in your template or the plugin's own stylesheet to determine the look of the box. The box plugins comes with the following classes already defined:
    • round — box will have rounded corners
    • blue — blue colour scheme
    • red — red colour scheme
    • green — green colour scheme
    • orange — orange colour scheme
    • left — float the box left within the wiki page
    • right — float the box right within the wiki page

if no classes are specified the default styles will be used, that is square corners in a colour scheme based on the default DokuWiki colour scheme.

  • colours — 1-4 colours in CSS hex or RGB notation, e.g. #F00 #fcab94 rgb(255,255,0). The colours are applied in order to:
    1. content background
    2. title background
    3. outer box background
    4. borders

if less than four colours are specified, the first colour is used for the missing colours.

  • title text — text (including DokuWiki markup) displayed above the box contents, with distinct style.
  • caption text — text (no markup allowed) displayed below the box contents, with distinct style.

The opening <box … > including the title must all appear on one line. The box contents can appear over as many lines as are needed.

See the plugin in action here. The sample page shows all the'styles available with the plugin.

folded

Inline:

This is example ++text | with some of it only shown when you unfold it++. And after that
the text just continues to flow in the same paragraph.

This is example text . And after that the text just continues to flow in the same paragraph.

Block:

This is example text. ++++ Title |


| This table | is only shown | when you unfold the block |

{{page>some other wiki page&inline}}

++++

This is example text.

Title

This is example title text.

Inline Block
Syntax ++title| formatted text ++ ++++title| any content ++++
HTML <span> tag <div> tag
Can contain formatting :-) :-)
Can contain block elements1) :-)
Can be used within a paragraph, table, list, etc. :-)

plugin:folded

select

<select Example>
wiki:plugins|Plugin Top
plugin:select|Select plugin
</select>

<select Example> wiki:plugins|Plugin Top wiki:manual_update|수동 업데이트 방법 wiki:plugins#select|Select plugin </select>

SyntaxHighlighter4 plugin

https://github.com/crazy-max/dokuwiki-plugin-syntaxhighlighter4

Example

<sxh php; first-line: 89; highlight: [106,107]; title: New title attribute in action>
    /**
     * Render xhtml output or metadata
     *
     * @param string         $mode      Renderer mode (supported modes: xhtml)
     * @param Doku_Renderer  $renderer  The renderer
     * @param array          $data      The data from the handler() function
     * @return bool If rendering was successful.
     */
    public function render($mode, Doku_Renderer &$renderer, $data) {
        if($mode != 'xhtml') return false;

        if (count($data) != 3) {
            return true;
        }

        list($syntax, $attr, $content) = $data;
        if ($syntax == 'sxh') {
            $title = $this->procTitle($attr);
            $highlight = $this->procHighlight($attr);
            $renderer->doc .= '<pre class="brush: ' . strtolower($attr . $highlight) . '"' . $title . '>' . $renderer->_xmlEntities($content) . '</pre>';
        } else {
            $renderer->file($content);
        }

        return true;
    }
</sxh>

    /**
     * Render xhtml output or metadata
     *
     * @param string         $mode      Renderer mode (supported modes: xhtml)
     * @param Doku_Renderer  $renderer  The renderer
     * @param array          $data      The data from the handler() function
     * @return bool If rendering was successful.
     */
    public function render($mode, Doku_Renderer &$renderer, $data) {
        if($mode != 'xhtml') return false;

        if (count($data) != 3) {
            return true;
        }

        list($syntax, $attr, $content) = $data;
        if ($syntax == 'sxh') {
            $title = $this->procTitle($attr);
            $highlight = $this->procHighlight($attr);
            $renderer->doc .= '<pre class="brush: ' . strtolower($attr . $highlight) . '"' . $title . '>' . $renderer->_xmlEntities($content) . '</pre>';
        } else {
            $renderer->file($content);
        }

        return true;
    }

Page Redirect Plugin Syntax

~~REDIRECT>namespace:page~~
~~REDIRECT>http://example.com~~

plantumlparser Plugin

<uml>
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response

Alice -> Bob: Another authentication Request
Alice <-- Bob: another authentication Response
</uml>


Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response

Alice -> Bob: Another authentication Request
Alice <-- Bob: another authentication Response

1)
like tables, lists, new paragraphs, included files, etc.
wiki/plugins.1709817352.txt.gz · 마지막으로 수정됨: 저자 zasfe

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki