tleditors

See source code

A global registry of currently mounted editor instances. Use it to discover live editors from outside the React tree, for example from sidebar chrome, keyboard shortcuts, or multi-editor layouts.

tleditors: {
  mounted: Signal<readonly Editor[]>;
  getMounted(): readonly Editor[];
};

Example

tleditors.getMounted(); // readonly Editor[]

const editors = useValue("mounted editors", () => tleditors.getMounted(), []);
Prev
TldrawEditor
Next
tlenv