Skip to content
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
12 changes: 10 additions & 2 deletions packages/lexical-playground/__tests__/e2e/Markdown.spec.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1020,7 +1020,11 @@ test.describe.parallel('Markdown', () => {
class="editor-equation"
contenteditable="false"
data-lexical-decorator="true">
<img alt="" src="#" />
<img
alt=""
height="0"
src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"
width="0" />
<span role="button" tabindex="-1">
<span class="katex">
<span class="katex-html" aria-hidden="true">
Expand All @@ -1031,7 +1035,11 @@ test.describe.parallel('Markdown', () => {
</span>
</span>
</span>
<img alt="" src="#" />
<img
alt=""
height="0"
src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"
width="0" />
</span>
<br />
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ test.describe('Regression tests for #6974', () => {
const beforeHtml = html`
<p>
<span contenteditable="false" data-lexical-decorator="true">
<img alt="" src="#" />
<img
alt=""
height="0"
src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"
width="0" />
<span role="button" tabindex="-1">
<span>
<span aria-hidden="true">
Expand All @@ -49,7 +53,11 @@ test.describe('Regression tests for #6974', () => {
</span>
</span>
</span>
<img alt="" src="#" />
<img
alt=""
height="0"
src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"
width="0" />
</span>
<br />
</p>
Expand All @@ -64,7 +72,11 @@ test.describe('Regression tests for #6974', () => {
const afterHtml = html`
<p dir="ltr">
<span contenteditable="false" data-lexical-decorator="true">
<img alt="" src="#" />
<img
alt=""
height="0"
src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"
width="0" />
<span role="button" tabindex="-1">
<span>
<span aria-hidden="true">
Expand All @@ -75,7 +87,11 @@ test.describe('Regression tests for #6974', () => {
</span>
</span>
</span>
<img alt="" src="#" />
<img
alt=""
height="0"
src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"
width="0" />
</span>
<span data-lexical-text="true">test</span>
</p>
Expand Down
14 changes: 12 additions & 2 deletions packages/lexical-playground/src/ui/KatexRenderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,24 @@ export default function KatexRenderer({
// inner text from Katex. There didn't seem to be any other way of making this work,
// without having a physical space.
<>
<img src="#" alt="" />
<img
src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"
width="0"
height="0"
alt=""
/>
<span
role="button"
tabIndex={-1}
onDoubleClick={onDoubleClick}
ref={katexElementRef}
/>
<img src="#" alt="" />
<img
src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"
width="0"
height="0"
alt=""
/>
</>
);
}