Skip to content

Commit

Permalink
Add live demo example for TINY-10682
Browse files Browse the repository at this point in the history
  • Loading branch information
FarzadHayat committed Apr 2, 2024
1 parent 55973c8 commit 42c5e8b
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 4 deletions.
9 changes: 9 additions & 0 deletions modules/ROOT/examples/live-demos/tiny-10682-after/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<div id="div#tiny-10682-initial">
<div class="mce-toc">
<h2>Table of <em>Contents</em></h2>
<ul>
<li><a href="#my-heading">My Heading</a></li>
</ul>
</div>
<h1 id="my-heading">My Heading</h1>
</div>
8 changes: 8 additions & 0 deletions modules/ROOT/examples/live-demos/tiny-10682-after/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
tinymce.init({
selector: 'div#tiny-10682-after',
plugins: 'tableofcontents',
menubar: false,
inline: true,
toolbar: false,
readonly: true
});
9 changes: 9 additions & 0 deletions modules/ROOT/examples/live-demos/tiny-10682-before/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<div id="div#tiny-10682-before">
<div class="mce-toc">
<h2>Table of &lt;em&gt;Contents&lt;/em&gt;</h2>
<ul>
<li><a href="#my-heading">My Heading</a></li>
</ul>
</div>
<h1 id="my-heading">My Heading</h1>
</div>
8 changes: 8 additions & 0 deletions modules/ROOT/examples/live-demos/tiny-10682-before/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
tinymce.init({
selector: 'div#tiny-10682-before',
plugins: 'tableofcontents',
menubar: false,
inline: true,
toolbar: false,
readonly: true
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<div id="div#tiny-10682-initial">
<div class="mce-toc">
<h2>Table of <em>Contents</em></h2>
<ul>
<li><a href="#my-heading">My Heading</a></li>
</ul>
</div>
<h1 id="my-heading">My Heading</h1>
</div>
8 changes: 8 additions & 0 deletions modules/ROOT/examples/live-demos/tiny-10682-initial/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
tinymce.init({
selector: 'div#tiny-10682-initial',
plugins: 'tableofcontents',
menubar: false,
inline: true,
toolbar: false,
readonly: true
});
8 changes: 4 additions & 4 deletions modules/ROOT/pages/7.0.1-release-notes.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,15 @@ To address this issue, the HTML encoding has been removed. As a result, the ToC

For example, if the **Table of Contents** (ToC) header contained the following content with "_Contents_" emphasized as follows:

*`Table of _Contents_`*
liveDemo::tiny-10682-initial[]

Upon refreshing the ToC, the header would change to display the HTML tags literally, as follows:
Upon refreshing the ToC, the header would change to display the HTML tags literally, exposing the underlying HTML:

*`Table of <em>Contents</em>`*
liveDemo::tiny-10682-before[]

Now, the header maintains the intended HTML rendering even after refreshing:

*`Table of _Contents_`*
liveDemo::tiny-10682-after[]

==== Encode header title for literal display in Table of Contents.
// #TINY-10789
Expand Down

0 comments on commit 42c5e8b

Please sign in to comment.