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

[lexical] Bug Fix: Handle MutationObserver/input event re-ordering when using contentEditable inside of an iframe #7045

Merged
merged 2 commits into from
Jan 13, 2025
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
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ module.exports = {
// @lexical/yjs
'createBinding',
],
isLexicalProvider: ['updateEditor'],
isLexicalProvider: ['updateEditor', 'updateEditorSync'],
isSafeDollarFunction: '$createRootNode',
}),
],
Expand Down
8 changes: 8 additions & 0 deletions examples/vanilla-js-iframe/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Vanilla JS example in an iframe

Here we have simplest Lexical setup in rich text configuration (`@lexical/rich-text`) with history (`@lexical/history`) and accessibility (`@lexical/dragon`) features enabled using an iframe
for the contentEditable surface.

**Run it locally:** `npm i && npm run dev`

[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/facebook/lexical/tree/main/examples/vanilla-js-iframe?file=src/main.ts)
33 changes: 33 additions & 0 deletions examples/vanilla-js-iframe/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Lexical Basic - Vanilla JS iframe</title>
</head>
<body>
<template id="app-template">
<div>
<h1>Lexical Basic - Vanilla JS iframe</h1>
<div class="editor-wrapper">
<div id="lexical-editor" contenteditable></div>
</div>
<h4>Editor state:</h4>
<textarea id="lexical-state"></textarea>
</div>
</template>
<iframe
id="app-iframe"
height="100%"
style="
border: none;
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
"
width="100%"></iframe>
<script src="/src/main.ts" type="module"></script>
</body>
</html>
Loading
Loading