Rules generators
Below is the list of individual RulesGenerators. Some of them are used for convenience (rules that are expected by the average user, such as suspending formatting where code is expected) some are used for compliance (to ensure the output remains valid HTML5) and some are used for both.
Most rules generators are enabled by default, some must be enabled manually.
See Tag rules for the rules definitions.
- AllowAll
-
Purpose: convenience. Default: disabled.
Generates
allowChildandallowDescendantrules for every combination of tags. It effectively allows any tag to be used anywhere. - AutoCloseIfVoid
-
Purpose: convenience. Default: enabled.
Generates an
autoCloserule for tags that are rendered as void elements. For example, a BBCode that renders as animgelement can be used as[img=foo.png]. - AutoReopenFormattingElements
-
Purpose: convenience. Default: enabled.
Generates an
autoReopenrule for tags that are renderered as formatting elements. Emulates HTML5's behaviour regarding misnested formatting elements. - BlockElementsCloseFormattingElements
-
Purpose: compliance. Default: enabled.
Generates a
closeParentrule for tags that are renderered as "block" elements, targeting formatting elements. For example,divinside ofb. - BlockElementsFosterFormattingElements
-
Purpose: convenience/compliance. Default: enabled.
Generates a
fosterParentrule for tags that are renderered as "block" elements, targeting formatting elements. For example,divinside ofb. Emulates HTML5's behaviour regarding misnested elements. - DisableAutoLineBreaksIfNewLinesArePreserved
-
Purpose: convenience. Default: enabled.
Generates a
disableAutoLineBreaksrule for tags that render their content in an element that defaults to preserving new lines such aspre, or in an element that has a style attribute that preserves new lines such as<div style="white-space: pre">. - EnforceContentModels
-
Purpose: compliance. Default: enabled.
Generates
breakParagraph,denyChild,denyDescendant,disableAutoLineBreaks,enableAutoLineBreaksandsuspendAutoLineBreaksrules to disallow tags in contexts where their HTML representation is not allowed.See HTML5 Content Models.
-
Purpose: compliance. Default: enabled.
Generates
closeParentrules to automatically close tags in contexts where their end tag is optional (such as with consecutivelielements) and would otherwise be automatically created by the browser's HTML5 parser.See HTML5 Optional Tags.
-
Purpose: convenience. Default: enabled.
Generates an
ignoreTagsrule for tags that render their content in acodeelement. - IgnoreTextIfDisallowed
-
Purpose: compliance. Default: enabled.
Generates an
ignoreTextrule for tags that disallow text content as per HTML5 content models. For example, between aulelement itslichild. - IgnoreWhitespaceAroundBlockElements
-
Purpose: convenience. Default: enabled.
Generates an
ignoreSurroundingWhitespacerule for tags that render their content in a "block" element such asdivorblockquote. The concept of a "block" element does not exist in HTML5, the term is used loosely to designate elements that do not use the HTML5 phrasing content model. This rule lets the user insert an empty line to separate block elements (such as citations or list items) without adding unwantedbrs to the output. - ManageParagraphs
-
Purpose: convenience/compliance. Default: disabled.
Generates
createParagraphsrules for tags that render their content in a "block" element andbreakParagraphfor elements whose template automatically closes current paragraph as per HTML5's optional tags rules. - TrimFirstLineInCodeBlocks
-
Purpose: convenience. Default: enabled.
Generates a
trimFirstLinerule for tags that render their content in a<pre><code>block.