-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[lexical] Bug Fix: Handle MutationObserver/input event re-ordering wh…
…en using contentEditable inside of an iframe (#7045)
- Loading branch information
Showing
18 changed files
with
1,386 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
Oops, something went wrong.