PluginWikiLinks
in package
Wiki style links
This plugin is used to create links that have a shorter format than Markdown style links.
Simplified markup for internal links. It supports:
- hypertext links
-
[[
: opening - url-path.
- ==space== followed by html attribute tags (if any, can be omitted)
-
|
followed by the link text if not specified, defaults to the url-path - optional modifier character. Could be one of the following:
-
^
: Open in new window (shortcut to target="_blank") -
$
: Create an editing link (with ?do=edit) -
*
: normal link with an attached PENCIL link next to it.
-
-
]]
: closing
-
- img tags
-
{{
: opening - url-path
- ==space== followed by html attribute tags (if any, can be omitted)
-
|
followed by thealt
andtitle
text. Defaults to url-path. -
}}
: closing
-
URL paths rules:
- paths beginning with
/
are relative to the root of the wiki - paths beginning with
!/
search for full file paths that end with that path in the entire wiki. - paths beginnig with
!
(without/
) match basename in the entire wiki. - paths are relative to the current document.
Tags
Table of Contents
Constants
- VERSION = '1.2.0'
- var string
Properties
- $tree_cache : mixed
- file list cache var string[]
Methods
- load() : void
- Loading entry point for this class
- wikiLinks() : string
- WikiLinks implementation
Constants
VERSION
var string
public
mixed
VERSION
= '1.2.0'
Properties
$tree_cache
file list cache var string[]
public
static mixed
$tree_cache
= \NULL
Methods
load()
Loading entry point for this class
public
static load(array<string|int, mixed> $cfg) : void
Hooks post-render event implemented by this class
Parameters
- $cfg : array<string|int, mixed>
wikiLinks()
WikiLinks implementation
public
static wikiLinks(NanoWikiApp $wiki, string $html) : string
Parameters
- $wiki : NanoWikiApp
-
running wiki instance
- $html : string
-
Input text
Return values
string —text with expanded links