.. include:: /Includes.rst.txt .. _encapslines: =========== encapsLines =========== .. _encapstaglist: encapsTagList ============= :aspect:`Property` encapsTagList :aspect:`Data type` list of strings :aspect:`Description` List of tags which qualify as encapsulating tags. Must be lowercase. :aspect:`Example` :: encapsTagList = div, p This setting will recognize the red line below as encapsulated lines: .. code-block:: html First line of text Some
Some text
Some text
Some text
|
This: .. code-block:: html First line of textSome text
becomes this: .. code-block:: htmlFirst line of text
Some text
.. _innerstdwrap\_all: innerStdWrap\_all ================= :aspect:`Property` innerStdWrap\_all :aspect:`Data type` :ref:`stdWrap` :aspect:`Description` Wraps the content inside all lines, whether they are encapsulated or not. .. _encapslinesstdwrap.[*tagname*]: encapsLinesStdWrap.[*tagname*] ============================== :aspect:`Property` encapsLinesStdWrap.[*tagname*] :aspect:`Data type` :ref:`stdWrap` :aspect:`Description` Wraps the content inside all encapsulated lines. ([*tagname*] is in uppercase.) .. _defaultalign: defaultAlign ============ :aspect:`Property` defaultAlign :aspect:`Data type` :ref:`data-type-string` / :ref:`stdWrap` :aspect:`Description` If set, this value is set as the default "align" value of the wrapping tags, both from :ref:`encapsTagList`, :typoscript:`bypassEncapsTagList` and :ref:`nonWrappedTag` .. _nonwrappedtag: nonWrappedTag ============= :aspect:`Property` nonWrappedTag :aspect:`Data type` :typoscript:`tagname` :aspect:`Description` For all non-wrapped lines, you can here set a tag in which they should be wrapped. Example would be "p". This is an alternative to :typoscript:`wrapNonWrappedLines` and has the advantage that its attributes are set by :typoscript:`addAttributes` as well as :typoscript:`defaultAlign`. Thus you can match the wrapping tags used for non-wrapped and wrapped lines more easily. .. _encapslines-examples: Example ======= :: encapsLines { encapsTagList = div,p remapTag.DIV = P wrapNonWrappedLines =|
innerStdWrap_all.ifEmpty = } This example shows how to handle content rendered by TYPO3 and stylesheets where thetag is used to encapsulate each line. Say, you have made this content with the Rich Text Editor:: This is line # 1 [Above is an empty line!]
This is line # 1
[Above is an empty line!]
This line is right-aligned.
Each line is nicely wrapped with :html:`` tags. The line from the database which was *already* wrapped (but in :html:`
`, but keeps it's alignment. Overall, notice that the Rich Text Editor
ONLY stored the line which was in fact right-aligned - every other line from the
RTE was stored without any wrapping tags, so that the content in the database
remains as human readable as possible.
Example
=======
::
# Make sure nonTypoTagStdWrap operates
# on content outside | ` tags, setting the line-distances to regular space like that
generated by a :html:`
before typohead.
tt_content.text.20.parseFunc.tags.typohead.stdWrap.wrap >
# Setting up nonTypoTagStdWrap to wrap the text with p-tags
tt_content.text.20.parseFunc.nonTypoTagStdWrap >
tt_content.text.20.parseFunc.nonTypoTagStdWrap.encapsLines {
encapsTagList = div,p
remapTag.DIV = P
wrapNonWrappedLines =
-tag after the content...
tt_content.text.20.wrap >
This is an example of how to wrap traditional tt\_content bodytext
with :html:`
` tag, but staying compatible with the RTE features
such as assigning classes and alignment to paragraphs.