{"id":13530632,"url":"https://github.com/torchbox/wagtail-markdown","last_synced_at":"2025-10-05T14:58:08.847Z","repository":{"id":2797933,"uuid":"42451079","full_name":"torchbox/wagtail-markdown","owner":"torchbox","description":"Markdown support for Wagtail","archived":false,"fork":false,"pushed_at":"2025-05-22T13:41:57.000Z","size":538,"stargazers_count":203,"open_issues_count":11,"forks_count":67,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-05-29T07:55:33.468Z","etag":null,"topics":["django","hacktoberfest","markdown","wagtail","wagtail-cms","wagtail-plugin"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"zlib","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/torchbox.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2015-09-14T13:42:45.000Z","updated_at":"2025-05-22T13:42:01.000Z","dependencies_parsed_at":"2024-01-07T13:10:00.560Z","dependency_job_id":"32627dd2-a336-4a22-9421-77bd897fae12","html_url":"https://github.com/torchbox/wagtail-markdown","commit_stats":{"total_commits":173,"total_committers":26,"mean_commits":6.653846153846154,"dds":0.6242774566473989,"last_synced_commit":"e3a05668293486beeb5a6be53d0acfdbe3cf6bdd"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/torchbox/wagtail-markdown","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/torchbox%2Fwagtail-markdown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/torchbox%2Fwagtail-markdown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/torchbox%2Fwagtail-markdown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/torchbox%2Fwagtail-markdown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/torchbox","download_url":"https://codeload.github.com/torchbox/wagtail-markdown/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/torchbox%2Fwagtail-markdown/sbom","scorecard":{"id":894856,"data":{"date":"2025-08-11","repo":{"name":"github.com/torchbox/wagtail-markdown","commit":"c67c2b366f2b2a657fa5fa89d406f7293a834389"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.3,"checks":[{"name":"Maintained","score":1,"reason":"1 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":3,"reason":"Found 5/13 approved changesets -- score normalized to 3","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'actions' permission set to 'read': .github/workflows/codeql-analysis.yml:14","Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql-analysis.yml:15","Info: topLevel 'contents' permission set to 'read': .github/workflows/ci.yml:14","Warn: no topLevel permission defined: .github/workflows/codeql-analysis.yml:1","Warn: no topLevel permission defined: .github/workflows/nightly-tests.yaml:1","Info: topLevel 'contents' permission set to 'read': .github/workflows/publish.yml:8","Warn: no topLevel permission defined: .github/workflows/ruff.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/torchbox/wagtail-markdown/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:44: update your workflow using https://app.stepsecurity.io/secureworkflow/torchbox/wagtail-markdown/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:48: update your workflow using https://app.stepsecurity.io/secureworkflow/torchbox/wagtail-markdown/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:60: update your workflow using https://app.stepsecurity.io/secureworkflow/torchbox/wagtail-markdown/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:74: update your workflow using https://app.stepsecurity.io/secureworkflow/torchbox/wagtail-markdown/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:84: update your workflow using https://app.stepsecurity.io/secureworkflow/torchbox/wagtail-markdown/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:87: update your workflow using https://app.stepsecurity.io/secureworkflow/torchbox/wagtail-markdown/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:95: update your workflow using https://app.stepsecurity.io/secureworkflow/torchbox/wagtail-markdown/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:108: update your workflow using https://app.stepsecurity.io/secureworkflow/torchbox/wagtail-markdown/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/torchbox/wagtail-markdown/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/torchbox/wagtail-markdown/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/torchbox/wagtail-markdown/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nightly-tests.yaml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/torchbox/wagtail-markdown/nightly-tests.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nightly-tests.yaml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/torchbox/wagtail-markdown/nightly-tests.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/torchbox/wagtail-markdown/publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/torchbox/wagtail-markdown/publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/torchbox/wagtail-markdown/publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:48: update your workflow using https://app.stepsecurity.io/secureworkflow/torchbox/wagtail-markdown/publish.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish.yml:51: update your workflow using https://app.stepsecurity.io/secureworkflow/torchbox/wagtail-markdown/publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ruff.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/torchbox/wagtail-markdown/ruff.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ruff.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/torchbox/wagtail-markdown/ruff.yml/main?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/nightly-tests.yaml:27","Info:   0 out of  18 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   3 third-party GitHubAction dependencies pinned","Info:   0 out of   1 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: zlib License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":9,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/torchbox/.github/SECURITY.md:1","Info: Found linked content: github.com/torchbox/.github/SECURITY.md:1","Warn: One or no descriptive hints of disclosure, vulnerability, and/or timelines in security policy","Info: Found text in security policy: github.com/torchbox/.github/SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"SAST","score":7,"reason":"SAST tool detected but not run on all commits","details":["Info: SAST configuration detected: CodeQL","Warn: 0 commits out of 25 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-24T13:18:38.232Z","repository_id":2797933,"created_at":"2025-08-24T13:18:38.232Z","updated_at":"2025-08-24T13:18:38.232Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278470181,"owners_count":25992203,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["django","hacktoberfest","markdown","wagtail","wagtail-cms","wagtail-plugin"],"created_at":"2024-08-01T07:00:52.719Z","updated_at":"2025-10-05T14:58:08.829Z","avatar_url":"https://github.com/torchbox.png","language":"Python","funding_links":[],"categories":["Apps"],"sub_categories":["Widgets"],"readme":"## wagtail-markdown: Markdown fields and blocks for Wagtail\n\n[![Build status](https://img.shields.io/github/actions/workflow/status/torchbox/wagtail-markdown/ci.yml?branch=main)](https://github.com/torchbox/wagtail-markdown/actions)\n[![PyPI](https://img.shields.io/pypi/v/wagtail-markdown.svg)](https://pypi.org/project/wagtail-markdown/)\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/torchbox/wagtail-markdown/main.svg)](https://results.pre-commit.ci/latest/github/torchbox/wagtail-markdown/main)\n\n\nTired of annoying rich text editors getting in the way of your content\ninput?  Wish Wagtail worked more like a wiki?  Well, now it can.\n\n`wagtail-markdown` provides Markdown field support for [Wagtail](https://github.com/torchbox/wagtail/).\nSpecifically, it provides:\n\n* A `wagtailmarkdown.blocks.MarkdownBlock` for use in StreamFields.\n* A `wagtailmarkdown.fields.MarkdownField` for use in Page models.\n* A `markdown` template tag.\n\nThe markdown rendered is based on `python-markdown`, but with several\nextensions to make it actually useful in Wagtail:\n\n* [Code highlighting](#syntax-highlighting).\n* [Inline links](#inline-links).\n* Inline Markdown preview using [EasyMDE](https://github.com/Ionaru/easy-markdown-editor)\n* Tables\n\nThese are implemented using the `python-markdown` extension interface.\n\n### Installation\nAvailable on PyPI - https://pypi.org/project/wagtail-markdown/.\n\nInstall using pip (`pip install wagtail-markdown`), poetry (`poetry add wagtail-markdown`) or your package manager of choice.\n\nAfter installing the package, add `wagtailmarkdown` to the list of installed apps in your settings file:\n\n```python\n# settings.py\n\nINSTALLED_APPS = [\n    # ...\n    \"wagtailmarkdown\",\n]\n```\n\n### Configuration\n\nAll `wagtail-markdown` settings are defined in a single `WAGTAILMARKDOWN` dictionary in your settings file:\n\n```python\n# settings.py\n\nWAGTAILMARKDOWN = {\n    \"autodownload_fontawesome\": False,\n    \"allowed_tags\": [],  # optional. a list of HTML tags. e.g. ['div', 'p', 'a']\n    \"allowed_styles\": [],  # optional. a list of styles\n    \"allowed_attributes\": {},  # optional. a dict with HTML tag as key and a list of attributes as value\n    \"allowed_settings_mode\": \"extend\",  # optional. Possible values: \"extend\" or \"override\". Defaults to \"extend\".\n    \"extensions\": [],  # optional. a list of python-markdown supported extensions\n    \"extension_configs\": {},  # optional. a dictionary with the extension name as key, and its configuration as value\n    \"extensions_settings_mode\": \"extend\",  # optional. Possible values: \"extend\" or \"override\". Defaults to \"extend\".\n    \"tab_length\": 4,  # optional. Sets the length of tabs used by python-markdown to render the output. This is the number of spaces used to replace with a tab character. Defaults to 4.\n}\n```\n\nNote: `allowed_tags`, `allowed_styles`, `allowed_attributes`, `extensions` and `extension_configs` are added to the\n[default wagtail-markdown settings](https://github.com/torchbox/wagtail-markdown/blob/main/src/wagtailmarkdown/constants.py).\n\n\n#### Custom FontAwesome Configuration - `autodownload_fontawesome`\nThe EasyMDE editor is compatible with [FontAwesome 5](https://fontawesome.com/how-to-use/graphql-api/intro/getting-started).\nBy default, EasyMDE will get version 4.7.0 from a CDN. To specify your own version, set\n\n```python\n# settings.py\n\nWAGTAILMARKDOWN = {\n    # ...\n    \"autodownload_fontawesome\": False,\n}\n```\n\nGet the desired FontAwesome version. For the latest version you can use:\n\n```sh\ncurl -H \"Content-Type: application/json\" \\\n-d '{ \"query\": \"query { release(version: \\\"latest\\\") { version } }\" }' \\\nhttps://api.fontawesome.com\n```\n\nthen add the following to a `wagtail_hooks` module in a registered app in your application:\n\n```python\n# Content of app_name/wagtail_hooks.py\nfrom wagtail import hooks\nfrom django.conf import settings\nfrom django.utils.html import format_html\n\n\n@hooks.register(\"insert_global_admin_css\")\ndef import_fontawesome_stylesheet():\n    elem = '\u003clink rel=\"stylesheet\" href=\"{}path/to/font-awesome.min.css\"\u003e'.format(\n        settings.STATIC_URL\n    )\n    return format_html(elem)\n```\n\nNote that due to the way EasyMDE defines the toolbar icons it is not compatible with\n[Wagtail FontAwesome](https://gitlab.com/alexgleason/wagtailfontawesome)\n\n##### Using with django-compressor\n\nYou may have your own SCSS sources that you want to precompile on the fly.\nWe can invoke django-compressor to fetch our Font Awesome SCSS sources like this:\n\n```python\n# Content of app_name/wagtail_hooks.py\nfrom compressor.css import CssCompressor\nfrom wagtail import hooks\nfrom django.conf import settings\nfrom django.utils.html import format_html\n\n\n@hooks.register(\"insert_global_admin_css\")\ndef import_fontawesome_stylesheet():\n    elem = '\u003clink rel=\"stylesheet\" type=\"text/x-scss\" href=\"{}scss/fontawesome.scss\"\u003e'.format(\n        settings.STATIC_URL\n    )\n    compressor = CssCompressor(\"css\", content=elem)\n    output = \"\"\n    for s in compressor.hunks():\n        output += s\n    return format_html(output)\n```\n\n\n#### Markdown extensions - `extensions`/`extension_configs`\n\nYou can configure wagtail-markdown to use additional Markdown extensions using the `extensions` setting.\n\nFor example, to enable the [Table of Contents](https://python-markdown.github.io/extensions/toc/) and\n[Sane Lists](https://python-markdown.github.io/extensions/sane_lists/) extensions:\n\n```python\nWAGTAILMARKDOWN = {\n    # ...\n    \"extensions\": [\"toc\", \"sane_lists\"]\n}\n```\n\nExtensions can be configured too:\n\n```python\nWAGTAILMARKDOWN = {\n    # ...\n    \"extension_configs\": {\"pymdownx.arithmatex\": {\"generic\": True}}\n}\n```\n\n#### Allowed HTML - `allowed_styles` / `allowed_attributes` / `allowed_tags`\n\nwagtail-markdown uses [bleach](https://github.com/mozilla/bleach) to sanitise the input. To extend the default\nbleach configurations, you can add your own allowed tags, styles or attributes:\n\n```python\nWAGTAILMARKDOWN = {\n    # ...\n    \"allowed_tags\": [\"i\"],\n    \"allowed_styles\": [\"some_style\"],\n    \"allowed_attributes\": {\"i\": [\"aria-hidden\"]},\n}\n```\n\n#### Syntax highlighting\n\nSyntax highlighting using codehilite is an optional feature, which works by\nadding CSS classes to the generated HTML. To use these classes, you will need\nto install Pygments (`pip install Pygments`), and to generate an appropriate\nstylesheet. You can generate one as per the [Pygments documentation](http://pygments.org/docs/quickstart/), with:\n\n```python\nfrom pygments.formatters import HtmlFormatter\n\nprint(HtmlFormatter().get_style_defs(\".codehilite\"))\n```\n\nSave the output to a file and reference it somewhere that will be\npicked up on pages rendering the relevant output, e.g. your base template:\n\n```html+django\n\u003clink rel=\"stylesheet\" type=\"text/css\" href=\"{% static 'path/to/pygments.css' %}\"\u003e\n```\n\n#### EasyMDE configuration\n\nYou can customise the [EasyMDE options](https://github.com/Ionaru/easy-markdown-editor#configuration). To do this,\ncreate a JavaScript file in your app (for example `my_app_name/static/js/easymde_custom.js`) and add the following:\n\n```js\nwindow.wagtailMarkdown = window.wagtailMarkdown || {};\nwindow.wagtailMarkdown.options = window.wagtailMarkdown.options || {};\nwindow.wagtailMarkdown.options.spellChecker = false;\n```\n\nThis overrides a specific option and leaves any other ones untouched. If you want to override all options, you can do:\n\n```js\nwindow.wagtailMarkdown = window.wagtailMarkdown || {};\nwindow.wagtailMarkdown.options = {\n    spellChecker: false,\n}\n```\n\nTo make sure that your JavaScript is executed, create a hook in `my_app_name/wagtail_hooks.py`:\n\n```python\nfrom django.templatetags.static import static\nfrom django.utils.html import format_html\n\nfrom wagtail import hooks\n\n\n@hooks.register(\"insert_global_admin_js\", order=100)\ndef global_admin_js():\n    \"\"\"Add /static/js/admin/easymde_custom.js to the admin.\"\"\"\n    return format_html('\u003cscript src=\"{}\"\u003e\u003c/script\u003e', static(\"js/easymde_custom.js\"))\n```\n\n#### Inline links\n\nwagtail-markdown supports custom inline links syntax:\n\n| Link to                                | Syntax                                                              | Notes                                                                                                                                                                |\n|----------------------------------------|---------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Pages                                  | `[title](page:PAGE_ID)`                                             | `PAGE_ID` is the page ID                                                                                                                                             |\n| Documents                              | `[title](doc:DOCUMENT_ID)`                                          | `DOCUMENT_ID` is the document ID                                                                                                                                     |\n| Media                                  | `[title](media:MEDIA_ID)`                                           | Needs [wagtailmedia](https://github.com/torchbox/wagtailmedia). `MEDIA_ID` is the media item ID                                                                      |\n| Images                                 | `![alt text](image:IMAGE_ID)`                                       | Renders an image tag. `IMAGE_ID` is the image ID                                                                                                                     |\n| ↳ with class attribute                 | `![alt text](image:IMAGE_ID,class=the-class-name)`                  | adds `class=\"the-class-name\" to the `\u003cimg\u003e` tag                                                                                                                      |\n| ↳ with rendition filter                | `![alt text](image:IMAGE_ID,filter=fill-200x200\u0026#x7c;format-webp)`  | Uses the same format as [generating renditions in Python](https://docs.wagtail.org/en/stable/advanced_topics/images/renditions.html#generating-renditions-in-python) |\n| ↳ class name and filter can be stacked | `![alt text](image:IMAGE_ID,class=the-class-name,filter=width-100)` |                                                                                                                                                                      |\n\n\n\nPreviously we supported custom link tags that used the target object title. They had the following form:\n* `\u003c:My page name|link title\u003e` or `\u003c:page:My page title\u003e`\n* `\u003c:doc:My fancy document.pdf\u003e`\n* `\u003c:image:My pretty image.jpeg\u003e`, `\u003c:image:My pretty image.jpeg|left\u003e` (`left` classname),\n  `\u003c:image:My pretty image.jpeg|right\u003e` (`right` classname), `\u003c:image:My pretty image.jpeg|full\u003e` (`full-name` classname),\n  `\u003c:image:My pretty image.jpeg|width=123\u003e` (outputs a rendition with `width-123`, and class `left`)\n\n⚠️ these types of tags are not reliable as titles can and will change. Support for  will be removed in the future.\n\n### Usage\n\nYou can use it as a `StreamField` block:\n\n```python\nfrom wagtail.blocks import StreamBlock\n\nfrom wagtailmarkdown.blocks import MarkdownBlock\n\n\nclass MyStreamBlock(StreamBlock):\n    markdown = MarkdownBlock(icon=\"code\")\n    # ...\n```\n\n\u003cimg src=\"https://i.imgur.com/4NFcfHd.png\" width=\"728px\" alt=\"\"\u003e\n\nOr use as a page field:\n\n```python\nfrom wagtail.admin.panels import FieldPanel\nfrom wagtail.models import Page\n\nfrom wagtailmarkdown.fields import MarkdownField\n\n\nclass MyPage(Page):\n    body = MarkdownField()\n\n    content_panels = [\n        FieldPanel(\"title\", classname=\"full title\"),\n        FieldPanel(\"body\"),\n    ]\n```\n\nAnd render the content in a template:\n\n```html+django\n{% load wagtailmarkdown %}\n\u003carticle\u003e\n{{ self.body|markdown }}\n\u003c/article\u003e\n```\n\n\u003cimg src=\"https://i.imgur.com/Sj1f4Jh.png\" width=\"728px\" alt=\"\"\u003e\n\n\n## Compatibility\n\nwagtail-markdown supports Wagtail 5.2 and above, python-markdown 3.3 and above.\n\n## Contributing\n\nAll contributions are welcome!\n\n### Installation\n\nTo make changes to this project, first clone this repository:\n\n```shell\ngit clone git@github.com:torchbox/wagtail-markdown.git\ncd wagtail-markdown\n```\n\nWith your preferred Python virtual environment activated, install testing dependencies:\n\n```shell\npip install -e '.[testing]' -U\n```\n\n### pre-commit\n\nNote that this project uses [pre-commit](https://github.com/pre-commit/pre-commit). To set up locally:\n\n```shell\n# if you don't have it yet\n$ pip install pre-commit\n# go to the project directory\n$ cd wagtail-markdown\n# initialize pre-commit\n$ pre-commit install\n\n# Optional, run all checks once for this, then the checks will run only on the changed files\n$ pre-commit run --all-files\n```\n\n### How to run tests\n\nTo run all tests in all environments:\n\n```sh\ntox -p\n```\n\nTo run tests for a specific environment:\n\n```shell\ntox -e py313-django5.1-wagtail6.3\n```\n\nor, a specific test\n\n```shell\ntox -e py313-django5.1-wagtail6.3 -- tests.testapp.tests.test_admin.TestFieldsAdmin\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftorchbox%2Fwagtail-markdown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftorchbox%2Fwagtail-markdown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftorchbox%2Fwagtail-markdown/lists"}