Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
e72fc42
[lexical-playground][lexical] Feature: Ruby annotation node (TextNode…
mayrang Jun 23, 2026
02fac88
[lexical-playground] Fix: Arrow key navigation skips over ruby nodes …
mayrang Jun 23, 2026
c9239cb
[lexical-playground] Fix: Arrow keys skip one ruby at a time, not all…
mayrang Jun 23, 2026
d9212ec
fix arrow key navigation: skip contiguous ruby group + preventDefault
mayrang Jun 23, 2026
3d5f747
[lexical-playground] Fix: Ruby node wrapper DOM, backspace delete, Sh…
mayrang Jun 23, 2026
05bb211
[lexical-playground][lexical] Fix: Ruby composition end token redirec…
mayrang Jun 23, 2026
376a7cf
[lexical-playground] Test: Ruby node unit tests + e2e browser navigat…
mayrang Jun 23, 2026
4610dd1
[lexical-playground] Feature: Floating ruby annotation editor + SVG t…
mayrang Jun 23, 2026
6138b06
Refactor: Replace $createRangeSelection with node.select() in ruby tests
mayrang Jun 23, 2026
55dc4cd
Fix: Update e2e tests to use floating ruby editor instead of dialog, …
mayrang Jun 23, 2026
a984763
Refactor: Convert RubyNode to $config() pattern with createState
mayrang Jun 23, 2026
33ce7e3
Restore STATIC_NODE_CONFIG_CACHE and createEditor validation
mayrang Jun 23, 2026
4e96bac
Fix: Use actual selection offset in token composition end redirect
mayrang Jun 23, 2026
9bccd05
Test: Add composition edge case tests for token redirect
mayrang Jun 23, 2026
521e95b
Refactor: Convert arrow key and COMPOSITION_END edge case tests to te…
mayrang Jun 23, 2026
00f2f7a
Fix: CI lint error and e2e test failures for ruby annotation
mayrang Jun 24, 2026
ce75084
Fix: Replace keyboard-based cursor positioning with programmatic setC…
mayrang Jun 24, 2026
8346513
Fix: Skip Ruby e2e tests in collab mode
mayrang Jun 24, 2026
f7766a2
Fix: Replace Home+selectCharacters with programmatic selection for we…
mayrang Jun 24, 2026
90f476c
Refactor: Use getDOMSelection and improve test patterns in ruby plugin
mayrang Jun 24, 2026
de2efba
Fix: Harden ruby plugin — stale closure, format preservation, nudge e…
mayrang Jun 24, 2026
4396a7f
Revert "Fix: Harden ruby plugin — stale closure, format preservation,…
mayrang Jun 24, 2026
55d53f1
Fix: Harden ruby plugin — stale closure, format preservation, handleD…
mayrang Jun 24, 2026
1d33695
Fix: Update e2e exportDOM assertion for <rp> fallback tags
mayrang Jun 24, 2026
4585367
Fix: Preserve format on ruby creation, add accessibility attributes
mayrang Jun 24, 2026
16e6249
Fix: Redirect composition away from token/segmented nodes at start
mayrang Jun 26, 2026
1150abb
Chore: Review feedback — colocate Ruby files, modernize node API, fix…
mayrang Jul 4, 2026
4a7b441
Fix: Harden floating ruby editor — cross-browser focus, composition, …
mayrang Jul 4, 2026
4443558
Chore: Review polish — type guards, extract helpers, add tests, enfor…
mayrang Jul 4, 2026
5227978
Chore: Prefix unused import rule parameter with underscore
mayrang Jul 4, 2026
8024e64
Chore: Remove redundant $transform token-mode guard
mayrang Jul 4, 2026
0a8698d
Fix: Remove nested editor.read() in CLICK_COMMAND + use ownerDocument
mayrang Jul 4, 2026
c77df26
[lexical-playground] Refactor: NodeCaret-based RubyExtension navigati…
claude Jul 4, 2026
f6983d1
Merge remote-tracking branch 'origin/main' into feat/7787-ruby-annota…
etrepum Jul 4, 2026
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
1,059 changes: 1,059 additions & 0 deletions packages/lexical-playground/__tests__/e2e/Ruby.spec.mjs

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions packages/lexical-playground/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ import PasteLogPlugin from './plugins/PasteLogPlugin';
import {PollExtension} from './plugins/PollExtension';
import {PullQuoteExtension} from './plugins/PullQuoteExtension';
import {ReactReviewExtension} from './plugins/ReviewExtension';
import {RubyExtension} from './plugins/RubyExtension';
import {SpecialTextExtension} from './plugins/SpecialTextExtension';
import {TabFocusExtension} from './plugins/TabFocusExtension';
import {TerseExportExtension} from './plugins/TerseExportExtension';
Expand Down Expand Up @@ -243,6 +244,7 @@ const PlaygroundRichTextExtension = /* @__PURE__ */ defineExtension({
ReactReviewExtension,
ReactFindReplaceExtension,
PullQuoteExtension,
RubyExtension,
/* @__PURE__ */ configExtension(TabIndentationExtension, {maxIndent: 7}),
],
name: '@lexical/playground/RichText',
Expand Down
9 changes: 9 additions & 0 deletions packages/lexical-playground/src/Editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import {ExcalidrawPlugin} from './plugins/ExcalidrawExtension';
import FloatingLinkEditorPlugin from './plugins/FloatingLinkEditorPlugin';
import FloatingTextFormatToolbarPlugin from './plugins/FloatingTextFormatToolbarPlugin';
import {MentionsPlugin} from './plugins/MentionsExtension';
import FloatingRubyEditorPlugin from './plugins/RubyExtension/FloatingRubyEditor';
import ShortcutsPlugin from './plugins/ShortcutsPlugin';
import SpeechToTextPlugin from './plugins/SpeechToTextPlugin';
import TableCellActionMenuPlugin from './plugins/TableActionMenuPlugin';
Expand Down Expand Up @@ -71,6 +72,7 @@ export default function Editor(): JSX.Element {
const [editor] = useLexicalComposerContext();
const [activeEditor, setActiveEditor] = useState(editor);
const [isLinkEditMode, setIsLinkEditMode] = useState<boolean>(false);
const [isRubyEditMode, setIsRubyEditMode] = useState<boolean>(false);

const onRef = (_floatingAnchorElem: HTMLDivElement) => {
if (_floatingAnchorElem !== null) {
Expand Down Expand Up @@ -99,6 +101,7 @@ export default function Editor(): JSX.Element {
activeEditor={activeEditor}
setActiveEditor={setActiveEditor}
setIsLinkEditMode={setIsLinkEditMode}
setIsRubyEditMode={setIsRubyEditMode}
/>
)}
{isRichText && (
Expand Down Expand Up @@ -139,6 +142,11 @@ export default function Editor(): JSX.Element {
isLinkEditMode={isLinkEditMode}
setIsLinkEditMode={setIsLinkEditMode}
/>
<FloatingRubyEditorPlugin
anchorElem={floatingAnchorElem}
isRubyEditMode={isRubyEditMode}
setIsRubyEditMode={setIsRubyEditMode}
/>
<TableCellActionMenuPlugin
anchorElem={floatingAnchorElem}
cellMerge={true}
Expand All @@ -153,6 +161,7 @@ export default function Editor(): JSX.Element {
<FloatingTextFormatToolbarPlugin
anchorElem={floatingAnchorElem}
setIsLinkEditMode={setIsLinkEditMode}
isRubyEditMode={isRubyEditMode}
/>
</>
)}
Expand Down
Loading
Loading