Skip to content

vadimkantorov/moncms

Repository files navigation

Lexical toolbar

  • Markdown
  • Undo
  • Redo
  • DIVIDER
  • Format style
  • DIVIDER
  • Font family
  • DIVIDER
  • Font weight -size+
  • DIVIDER
  • Bold
  • Italic
  • Underscore
  • Insert code block
  • Insert link
  • Text color
  • Highlight color
  • Text style: strikethrough, subscript, suprescript, clear formatting
  • DIVIDER
  • Insert block
  • Align

Google Docs toolbar

  • Search Menus
  • Undo
  • Redo
  • Print
  • Spellcheck
  • Print format
  • Zoom
  • DIVIDER
  • Format style
  • DIVIDER
  • Font family
  • DIVIDER
  • Font weight -size+
  • DIVIDER
  • Bold
  • Italic
  • Underscore
  • Text color
  • Highlight color
  • DIVIDER
  • Insert link
  • Add comment
  • Insert image
  • DIVIDER
  • Align
  • Line & paragraph spacing
  • Checklist
  • Bulleted list
  • Numbered list
  • Decrease indent
  • Increase list
  • Clear formatting
  • DIVIDER
  • Editing mode: Editing/Viewing
  • DIVIDER
  • Hiding the menus

Links

Test: image

wget https://github.com/facebook/lexical/archive/refs/tags/v0.16.0.tar.gz && tar -xf v0.16.0.tar.gz --strip-components=1 lexical-0.16.0/packages/lexical-playground lexical-0.16.0/packages/shared && git add -A -f packages

lexical-playground-only

<html>
    <head>
        <link rel="stylesheet" href="/assets/main.css">
        <script type="module" crossorigin src="/assets/main.js" onload="on_editor_script_loaded()"></script>
    </head>
    <body>
        <div id="editor"></div>
        <script>
        async function on_editor_script_loaded()
        {
            const editor = await window.LexicalMarkdownEditor('#editor');
            console.log(editor._getRawEditorInstance())

            const md = `
# [WIP ] lexical-playground-only

The idea is to have https://github.com/facebook/lexical/tree/main/packages/lexical-playground as a separate, lean repo bundlable as a single JS file to be used as a simple client-side markdown editor with usage API similar to https://github.com/quilljs/quill (and usable in vanilla HTML/JS without mandatory usage of package managers/bundlers/react)

Based on the broken release https://github.com/facebook/lexical/releases/tag/v0.12.5: https://github.com/facebook/lexical/discussions/5392

- do this
- do that
- cheers
`
            editor.setMarkdown(md)

            console.log(await editor.getMarkdown())

            window.editor = editor;
        }
        </script>
    </body>
</html>

References

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published