ExamplesExternal Text
Back to docs
Authored ChangesChecklistsCode HighlightingComment ModeCustom PlaceholderDocument StateEditable VoidsEmbedsExternal TextForced LayoutHidden Content BlocksHovering ToolbarHuge DocumentImagesInlinesLintingMarkdown PreviewMarkdown ShortcutsMentionsMulti-root DocumentPaginationExperimentalPaste HTMLPlain TextRead-onlyRendering in iframesRich TextSearch HighlightingShadow DOMStylingSynced BlocksTablesYjs CollaborationYjs Hocuspocus
Back to docs
Authored ChangesChecklistsCode HighlightingComment ModeCustom PlaceholderDocument StateEditable VoidsEmbedsExternal TextForced LayoutHidden Content BlocksHovering ToolbarHuge DocumentImagesInlinesLintingMarkdown PreviewMarkdown ShortcutsMentionsMulti-root DocumentPaginationExperimentalPaste HTMLPlain TextRead-onlyRendering in iframesRich TextSearch HighlightingShadow DOMStylingSynced BlocksTablesYjs CollaborationYjs Hocuspocus

External Text

Plate
PlateEditorsTemplates
GitHub16kGitHub
DiscordDiscord

One Plite document, two rendering engines. The textarea demonstrates the adapter contract; it is not a large-code editor.

Outer input events: 0

Native Plite

Before the external view.

One canonical text.
Edit either view.
Undo is shared.

After the external view.

External text view

Before the external view.

After the external view.

Canonical value and selection
{
  "selection": null,
  "value": {
    "children": [
      {
        "type": "paragraph",
        "children": [
          {
            "text": "Before the external view."
          }
        ]
      },
      {
        "type": "external-text",
        "children": [
          {
            "text": "One canonical text.\nEdit either view.\nUndo is shared."
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "text": "After the external view."
          }
        ]
      }
    ],
    "roots": {
      "notes": [
        {
          "type": "external-text",
          "children": [
            {
              "text": "An independently addressed note."
            }
          ]
        }
      ]
    }
  }
}

From zbeyens. The source code is available on GitHub.