You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to support raw html/xml blocks that will contain custom elements. So far I can't find examples in wiki or samples package. Could you please point me to proper parser configuration? I see that basic html elements and parsing of markdown are supported with almost default params
Example 1 (inline custom tags)
Given:
Link to <strong>page and _important_ </strong> <ac:link> <ri:page ri:content-title="Manual page"/><ac:plain-text-link-body><![CDATA[unmanaged page]]></ac:plain-text-link-body></ac:link>
I'd like to get:
<p>Link to <strong>page and <em>important</em> </strong> <ac:link><ri:page ri:content-title="Manual page"/><ac:plain-text-link-body><![CDATA[unmanaged page]]></ac:plain-text-link-body></ac:link></p>
But actual result is
<p>Link to <strong>page and <em>important</em> </strong> <a href="ac:link">ac:link</a> <ri:page ri:content-title="Manual page"/><a href="ac:plain-text-link-body">ac:plain-text-link-body</a><![CDATA[unmanaged page]]></ac:plain-text-link-body></ac:link></p>
Here looks like some oautolinking takes place and if I'd try to escape : then result is different but is also not desired:
<p>Link to <strong>page and <em>important</em> </strong> <ac:link> <ri:page ri:content-title="Manual page"/><ac:plain-text-link-body><![CDATA[unmanaged page]]></ac:plain-text-link-body></ac:link></p>
<ac:structured-macro ac:name="expand">
<ac:parameter ac:name="title">Title</ac:parameter>
<ac:rich-text-body>
.. rendering of image tag here ...
</ac:rich-text-body>
</ac:structured-macro>
Actual result:
<p><ac:structured-macro ac:name="expand" ac:schema-version="1">
<ac:parameter ac:name="title">Title</ac:parameter>
<a href="ac:rich-text-body">ac:rich-text-body</a>
.. rendering of image tag here ...
</ac:rich-text-body>
</ac:structured-macro></p>
My parser configuration is:
.set(Parser.REFERENCES_KEEP, KeepType.LAST)
.set(HtmlRenderer.INDENT_SIZE, 2)
.set(HtmlRenderer.PERCENT_ENCODE_URLS, true)
// for full GFM table compatibility add the following table extension options:
.set(TablesExtension.COLUMN_SPANS, false)
.set(TablesExtension.APPEND_MISSING_COLUMNS, true)
.set(TablesExtension.DISCARD_EXTRA_COLUMNS, true)
.set(TablesExtension.HEADER_SEPARATOR_COLUMN_MATCH, true)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'd like to support raw html/xml blocks that will contain custom elements. So far I can't find examples in wiki or samples package. Could you please point me to proper parser configuration? I see that basic html elements and parsing of markdown are supported with almost default params
Example 1 (inline custom tags)
Given:
I'd like to get:
But actual result is
Here looks like some oautolinking takes place and if I'd try to escape
:
then result is different but is also not desired:Example 2 (block tags)
Given
Expected result:
Actual result:
My parser configuration is:
Beta Was this translation helpful? Give feedback.
All reactions