Plugin Syntax
KARAS has a special syntax different from basic syntax. These syntax are called 'Plugin Syntax'. Plugin syntax enable to do special functions not to markup.
Plugin syntax is enabled only on the system which has the plugin.
Description
In order to write a plugin syntax, enclose the text with [[
and ```]]. Plugin syntax has 2 types. Level 1 plugin syntax is called 'Convert type'. And level 2 plugin syntax is called 'Action type'.
- Convert type plugin (Level1)
[[ PluginName :: option1 :: option2... :: markedupText]]
- Action type plugin (Level2)
[[[ PluginName :: option1 :: option2...]]]
In order to use plugin syntax, specify the name with ignore case at the first option. Each option is separated with ::
. By plugin name that you specified, the the process will change.
Convert type plugin is used to decorate or convert the text. For example, to convert the text written in other format. In convert type plugin,convert text must be specified as the last option.
Action type plugin is used to get the result which using all of the text. For example, to get the TOC(Table of Contents). Or, you can use it in order to command the system. For example, to insert comment field, or to hide the page.
Sample plugin
In here, describe about the plugin in default KARAS converter.
NowEditiong
NowEditing plugin is the plugin to remove the text and insert "Now Editing". In level 1(Convert type), it remove the text specified as option. In level 2(Action type), all of the text is removed from the result.
Mark
Mark plugin is the plugin to enclose the text with Mark tag. Mark plugin only has level 1 syntax(Convert type). If used as level 2(Action type), it returns error text. You can specify the markup color as 1st option, when there are 2 options.
KARAS has no syntax to output Mark element.
TOC (Table Of Contents)
TOC plugin is the plugin to output the heading list in the page. TOC plugin only has level 2 syntax(Action type). If used as level 1(Convert type), it returns error text. You can specify the minimum level of listed headings as 1st option. For example, if set '2' as 1st option, level 1 headings will be not included in the output list. You can also specify the maximum level of listed headings as 2nd option. For example, if set '3' as 2nd option, level 4,5,6 headings will be not included in the output list.