See
PublishedAPI for packages intended to be used by Plugin and Contrib authors, or
browse all packages.
See also
Developing plugins,
Developer's Bible,
Technical Overview
internal package
Foswiki::Plugins::WysiwygPlugin::HTML2TML::Constants
Extend
Foswiki::Plugins::WysiwygPlugin::Constants with
constants specific to
HTML2TML
Generator flags
NO_TML |
Flag that gets passed down into generator functions. Constrains output to HTML only. |
NO_BLOCK_TML |
Flag that gets passed down into generator functions. Don't generate block TML e.g. tables, lists |
NOP_ALL |
Flag that gets passed down into generator functions. NOP all variables and WikiWords. |
BLOCK_TML |
Flag passed up from generator functions; set if expansion includes block TML |
VERY_CLEAN |
Flag passed to indicate that HTML must be aggressively cleaned (unrecognised or unuseful tags stripped out) |
BR2NL |
Flag set to force BR tags to be converted to newlines. |
KEEP_WS |
Set to force the generator to keep all whitespace. Otherwise whitespace gets collapsed (as it is when HTML is rendered) |
PROTECTED |
In a block marked as PROTECTED |
KEEP_ENTITIES |
Don't decode HTML entities |
Forced whitespace
These single-character shortcuts are used to assert the presence of
non-breaking whitespace.
$NBSP |
Non-breaking space |
$NBBR |
Non-breaking linebreak |
Inline Assertions
The generator works by expanding to "decorated" text, where the decorators
are characters below ' '. These characters act to express format
requirements - for example, the need to have a newline before some text,
or the need for a space. The generator sticks this format requirements into
the text stream, and they are then optimised down to the minimum in a post-
process.
$CHECKn |
there must be an adjacent newline (\n or $NBBR) |
$CHECKs |
there must be an adjacent space (' ' or $NBSP) |
$CHECKw |
There must be adjacent whitespace (\s or $NBBR or $NBSP) |
$CHECK1 |
Marks the start of an inline wikiword. |
$CHECK2 |
Marks the end of an inline wikiword. |
$TAB |
Shorthand for an indent level in a list |