WYSIWYG editor for mkdocs-live-edit-plugin based on @celsowm/markdown-wysiwyg
Project description
mkdocs-live-wysiwyg-plugin
Try it out
There's a shell script which makes editing techdocs in this repository really quick. Run techdocs-preview.sh.
Features
A WYSIWYG (What-You-See-Is-What-You-Get) editor for mkdocs-live-edit-plugin, based on @celsowm/markdown-wysiwyg.
See shortcuts and behaviors document for how to edit documents.
- 🌈✨ Author quality of life features
- 👁-👁 Focus mode.
- ✅ Non-destructive WYSIWYG editing is a top priority. Minimal
git diff. - ✅ Content refactoring with automated content migration.
- ✅ Selected text to edit is the fastest flow.
- ✅ Editing preferences remembered across pages.
- ✅ A URL pasted onto selected text creates a markdown link.
- ✅ Automated content migration to mkdocs-nav-weight.
- 💪 Mkdocs/backstage rendering features
- ✅ Toggle-able checklists (task lists):
- [ ]and- [x]. - ✅ YAML frontmatter preserved when editing and switching modes.
- ✅ MkDocs admonitions (
!!! note,!!! warning, etc.). A UI button for inserting new admonitions. - ✅ Markdown link styles preserved (inline, reference, shortcut)
- ✅ Code blocks with WYSIWYG editable titles.
- ✅ Toggle-able checklists (task lists):
- ℹ️ Other noteworthy features
- ✅ Cursor location memory: when switching between WYSIWYG or Markdown modes the cursor location and scroll area is preserved to reduce editing strain on the author.
- ✅ Selected text is preserved when the author switches modes (to/from wysiwyg or markdown).
- ✅ Typing in with backticks inline will automatically convert text to inline code blocks.
- ✅ No external JavaScript; all assets are bundled locally within the mkdocs plugin.
When you click "Edit" in the live-edit plugin, this plugin replaces the plain textarea with a rich WYSIWYG editor.
More Screenshot
Requirements
- Python 3.10 or higher.
- mkdocs-live-edit-plugin (must be installed and configured)
- mkdocs >= 1.5
Installation
pip install mkdocs-live-wysiwyg-plugin
Or with uv:
uv pip install mkdocs-live-wysiwyg-plugin
This will install mkdocs-live-edit-plugin as a dependency. For development setup, see CONTRIBUTING.md.
Configuration
Add both plugins to your mkdocs.yml. Important: live-edit must be listed before live-wysiwyg:
plugins:
- live-edit
- live-wysiwyg:
autoload_wysiwyg: true # optional, if false, start with plain textarea and show "Enable Editor"
Options
| Option | Type | Default | Description |
|---|---|---|---|
autoload_wysiwyg |
boolean | true |
Default behavior when no user preference cookie exists. If true, the WYSIWYG editor loads automatically when entering edit mode. If false, the plain textarea is shown initially with an "Enable Editor" button. Once the user explicitly enables or disables the editor, their preference is stored in a cookie and takes priority over this setting. |
Attributions
This plugin incorporates or depends on the following works:
| Component | Author | License | Link |
|---|---|---|---|
| @celsowm/markdown-wysiwyg (WYSIWYG editor) | Celso Fontes | MIT | GitHub · npm |
| marked (Markdown parser) | Christopher Jeffrey, MarkedJS | MIT | GitHub · marked.js.org |
| mkdocs-live-edit-plugin (required dependency) | Eddy Luten | MIT | GitHub |
All listed components are distributed under the MIT License. See each project's repository for full license text.
The WYSIWYG editor and its dependencies (marked, editor.css, editor.js) are bundled locally in mkdocs_live_wysiwyg_plugin/vendor/—no external JavaScript or CSS is loaded at runtime.
MkDocs Theme Support
Only the Material for MkDocs theme is officially supported. Admonition styling and icons rely on Material theme CSS. Other themes may work but have not been tested.
Contributions to add support for other themes are welcome; see CONTRIBUTING.md. Material theme support is a requirement.
No breaking changes to Material theme compatibility are allowed.
MkDocs Admonitions
The WYSIWYG editor supports MkDocs admonition syntax (!!! note, !!! warning, etc.) in both modes:
- Markdown mode: Type
!!! notefollowed by indented content (4 spaces) - WYSIWYG mode: Admonitions render as styled callout boxes; editing preserves the
!!!syntax when saving
Supported types: note, warning, danger, tip, hint, important, caution, error, attention.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mkdocs_live_wysiwyg_plugin-0.3.6.tar.gz.
File metadata
- Download URL: mkdocs_live_wysiwyg_plugin-0.3.6.tar.gz
- Upload date:
- Size: 6.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
98c4ca7ef386adb7aa0c3b2d0d3ac5e19f3adc0675583c44652c768b5813096b
|
|
| MD5 |
2b8f9f7b112df02a26914cf25639f28a
|
|
| BLAKE2b-256 |
4ecfe5bc8a686e6039b9bcad516b884c5b1945ad804e4219931f6b523495bc65
|
Provenance
The following attestation bundles were made for mkdocs_live_wysiwyg_plugin-0.3.6.tar.gz:
Publisher:
publish.yml on samrocketman/mkdocs-live-wysiwyg-plugin
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mkdocs_live_wysiwyg_plugin-0.3.6.tar.gz -
Subject digest:
98c4ca7ef386adb7aa0c3b2d0d3ac5e19f3adc0675583c44652c768b5813096b - Sigstore transparency entry: 1141757191
- Sigstore integration time:
-
Permalink:
samrocketman/mkdocs-live-wysiwyg-plugin@e20a8397695699514e284225cf83ad2af9a07374 -
Branch / Tag:
refs/tags/v0.3.6 - Owner: https://github.com/samrocketman
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e20a8397695699514e284225cf83ad2af9a07374 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file mkdocs_live_wysiwyg_plugin-0.3.6-py3-none-any.whl.
File metadata
- Download URL: mkdocs_live_wysiwyg_plugin-0.3.6-py3-none-any.whl
- Upload date:
- Size: 6.0 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e5cc1a14fb0367b9151392c9804c11a13bc80387d628d0b078347038eefd065d
|
|
| MD5 |
03328c4b7405cbfede21202cea8d608c
|
|
| BLAKE2b-256 |
150b207b9014032c6d62b58d315b43a18657b5508f7dda778a42e5e59b5bc6da
|
Provenance
The following attestation bundles were made for mkdocs_live_wysiwyg_plugin-0.3.6-py3-none-any.whl:
Publisher:
publish.yml on samrocketman/mkdocs-live-wysiwyg-plugin
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mkdocs_live_wysiwyg_plugin-0.3.6-py3-none-any.whl -
Subject digest:
e5cc1a14fb0367b9151392c9804c11a13bc80387d628d0b078347038eefd065d - Sigstore transparency entry: 1141757265
- Sigstore integration time:
-
Permalink:
samrocketman/mkdocs-live-wysiwyg-plugin@e20a8397695699514e284225cf83ad2af9a07374 -
Branch / Tag:
refs/tags/v0.3.6 - Owner: https://github.com/samrocketman
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e20a8397695699514e284225cf83ad2af9a07374 -
Trigger Event:
workflow_dispatch
-
Statement type: