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
allowChild
andallowDescendant
rules for every combination of tags. If effectively allows any tag to be used anywhere. - AutoCloseIfVoid
-
Purpose: convenience. Default: enabled.
Generates an
autoClose
rule for tags that are rendered as void elements. For example, a BBCode that renders as animg
element can be used as[img=foo.png]
. - AutoReopenFormattingElements
-
Purpose: convenience. Default: enabled.
Generates an
autoReopen
rule for tags that are renderered as formatting elements. Emulates HTML5's behaviour regarding misnested formatting elements. - BlockElementsCloseFormattingElements
-
Purpose: compliance. Default: enabled.
Generates a
closeParent
rule for tags that are renderered as "block" elements, targeting formatting elements. For example,div
inside ofb
. - BlockElementsFosterFormattingElements
-
Purpose: convenience/compliance. Default: enabled.
Generates a
fosterParent
rule for tags that are renderered as "block" elements, targeting formatting elements. For example,div
inside ofb
. Emulates HTML5's behaviour regarding misnested elements. - DisableAutoLineBreaksIfNewLinesArePreserved
-
Purpose: convenience. Default: enabled.
Generates a
disableAutoLineBreaks
rule 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
,enableAutoLineBreaks
andsuspendAutoLineBreaks
rules to disallow tags in contexts where their HTML representation is not allowed.See HTML5 Content Models.
-
Purpose: compliance. Default: enabled.
Generates
closeParent
rules to automatically close tags in contexts where their end tag is optional (such as with consecutiveli
elements) and would otherwise be automatically created by the browser's HTML5 parser.See HTML5 Optional Tags.
-
Purpose: convenience. Default: enabled.
Generates an
ignoreTags
rule for tags that render their content in acode
element. - IgnoreTextIfDisallowed
-
Purpose: compliance. Default: enabled.
Generates an
ignoreText
rule for tags that disallow text content as per HTML5 content models. For example, between aul
element itsli
child. - IgnoreWhitespaceAroundBlockElements
-
Purpose: convenience. Default: enabled.
Generates an
ignoreSurroundingWhitespace
rule for tags that render their content in a "block" element such asdiv
orblockquote
. 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 unwantedbr
s to the output. - ManageParagraphs
-
Purpose: convenience/compliance. Default: disabled.
Generates
createParagraphs
rules for tags that render their content in a "block" element andbreakParagraph
for elements whose template automatically closes current paragraph as per HTML5's optional tags rules. - TrimFirstLineInCodeBlocks
-
Purpose: convenience. Default: enabled.
Generates a
trimFirstLine
rule for tags that render their content in a<pre><code>
block.