Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add fallback template for HTML tags #196

Merged
merged 2 commits into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions filter/xsl/filter_put.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,15 @@
</xsl:element>
</xsl:element>
</xsl:template>

<!--
Fallback template for arbitrary HTML tags that are not handled through dedicated templates.
Those "unknown" tags are simply removed for otherwise they would be stored unfiltered in the MEI document
See https://github.com/Edirom/MerMEId/issues/193
-->
<xsl:template match="h:*">
<xsl:apply-templates/>
</xsl:template>
<!-- end HTML -> MEI -->

<!-- utilities -->
Expand Down
9 changes: 7 additions & 2 deletions manual/faq.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ <h1>Frequently Asked Questions (FAQ)</h1>
<li><a href="#add_work_number">How do I make MerMEId recognize a certain number as a
catalogue work number?</a></li>
<li><a href="#batch_transform">Is there a way to do a 'search and replace' in all of my
files?</a><br />
</li>
files?</a></li>
<li><a href="#tiny_mce-restrictions">Can I paste any HTML tag/structure into the TINYMCE editor?</a></li>
</ul>
<p>Customizing the MerMEId editor</p>
<ul>
Expand Down Expand Up @@ -235,6 +235,11 @@ <h3>Is there a way to do a 'search and replace' in all of my files?<a name="batc
a script transforming all (or some) of your data. This allows you to do simple text
replacements but also complex structural changes. See <a href="batch_transform.html">Batch
transforming XML files in the database</a>.</p>
<h3 id="tiny_mce-restrictions">Can I paste any HTML tag/structure into the TINYMCE editor?</h3>
<p>No, since the HTML input needs to be transformed to MEI in the backend, only a limited set
of HTML tags are supported. These include the tags that are accesible via the buttons of the
editor like <code>&lt;em&gt;</code>, <code>&lt;span&gt;</code>, or <code>&lt;strong&gt;</code>.
Other HTML markup will be silently removed.</p>
<h2>Customizing the MerMEId editor</h2>
<h3>Can I add fields to the editor form or alter existing ones?<a name="customize"></a></h3>
<p>In principle yes, if you know how to write <a href="http://www.orbeon.com/" target="_blank"
Expand Down