{"id":15295724,"url":"https://github.com/eijawa/django-editorjs-field","last_synced_at":"2026-01-20T21:02:28.263Z","repository":{"id":65122936,"uuid":"580701913","full_name":"eijawa/django-editorjs-field","owner":"eijawa","description":"An EditorJS Field with dependency injection of tools support for Django \u003e4.*","archived":false,"fork":false,"pushed_at":"2023-01-06T09:19:34.000Z","size":187,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-03T21:12:31.784Z","etag":null,"topics":["django","editorjs"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eijawa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-12-21T08:22:25.000Z","updated_at":"2023-07-02T12:10:23.000Z","dependencies_parsed_at":"2023-02-05T19:00:35.249Z","dependency_job_id":null,"html_url":"https://github.com/eijawa/django-editorjs-field","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/eijawa/django-editorjs-field","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eijawa%2Fdjango-editorjs-field","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eijawa%2Fdjango-editorjs-field/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eijawa%2Fdjango-editorjs-field/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eijawa%2Fdjango-editorjs-field/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eijawa","download_url":"https://codeload.github.com/eijawa/django-editorjs-field/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eijawa%2Fdjango-editorjs-field/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28613659,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T18:56:40.769Z","status":"ssl_error","status_checked_at":"2026-01-20T18:54:26.653Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","editorjs"],"created_at":"2024-09-30T18:07:41.097Z","updated_at":"2026-01-20T21:02:28.163Z","avatar_url":"https://github.com/eijawa.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Django EditorJS Field\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n\u003e Django \u003e4.* (Not tested in old versions)\n\nAn EditorJS Field with dependency injection of tools support for Django \u003e4.*\n\n## Features\n\n- [x] Dependency injection for tools\n- [x] Templatetag support\n- [x] All EditorJS configuration supported\n- [x] Without custom backend\n- [x] Customized editor in admin\n- [x] [Debug support](#about-debug-support)\n\n## Installation and Usage\n\n### Installation\n\u003e Some day it will be *django-editorjs-field*...\n\nInstall package via `pip`:\n\n```\npip install django-editorjs-field-next\n```\n\nAdd package to `INSTALLED_APPS`:\n\n```\nINSTALLED_APPS = [\n    ...\n    \"django_editorjs_field\"\n]\n```\n\n### Usage\n\n\u003e**Note!**\u003cbr\u003eIf you will not provide configuration, you will have only default Paragraph Tool.\n\nExample of field configuration:\n\n```\nfrom django_editorjs_field.tool import EditorJSTool as Tool\n\n\nEditorJSField(\n    tools=[\n        Tool(name=\"Header\", url=\"//cdn.jsdelivr.net/npm/@editorjs/header\", template_name=\"tools/h.html\"),\n        Tool(\n            name=\"Code\",\n            url=\"https://cdn.jsdelivr.net/npm/@editorjs/code@2.8.0\",\n            class_name=\"CodeTool\",\n            template_name=\"tools/code.html\"\n        )\n    ]\n)\n```\n\n**Any** kwargs that you add will pass to EditorJS configuration. For example, if you want `autofocus`, `placeholder` and `i18n`, you just add to field arguments:\n\n```\nautofocus=False,\nplaceholder=\"EditorJSPlaceholder\",\ni18n={\n    \"messages\": {\n        \"toolNames\": {\n            \"Heading\": \"Заголовок\"\n        }\n    }\n}\n```\n\n**templatetag**\n\nExample of templatetag:\n\n```\n{% load editorjs %}\n\n{% for article in articles_list %}\n    \u003cdiv\u003e\n        \u003ch3\u003e{{ article.title }}\u003c/h3\u003e\n        {% render article %}\n    \u003c/div\u003e\n{% endfor %}\n```\n\n## Tools\n\nAll tools (plugins) are independent objects. Tool constructor define as:\n\n```\ndef __init__(self, name: str, url: str, template_name: str, class_name: str | None = None, **kwargs):\n    \"\"\"\n        An EditorJSTool constructor\n\n        ...\n\n        Attributes\n        ==========\n        name : str\n            Must be unique!\n            A name of a Tool. Used as a type in EditorJS.\n        url : str\n            A URL or Path to JS-file of Tool.\n        template_name : str\n            A Path to template for output rendering.\n        class_name : str | None\n            Name attribute is used by default.\n            A class name of Tool, which JS need to call constructor for.\n        version : str | None\n            Required plugin version.\n    \"\"\"\n```\n\n### Override Paragraph Tool\n\nIn order to override Paragraph Tool you need to pass it as a tool into field. Example:\n\n```\nfrom django_editorjs_field.tool import EditorJSTool as Tool\n\n\nEditorJSField(\n    tools=[\n        Tool(\n            name=\"paragraph\",\n            url=\"//cdn.jsdelivr.net/npm/@editorjs/paragraph@2.0.2\",\n            class_name=\"Paragraph\",\n            template_name=\"tools/p.html\"\n        )\n        Tool(name=\"Header\", url=\"//cdn.jsdelivr.net/npm/@editorjs/header\", template_name=\"tools/h.html\"),\n    ],\n    ...\n)\n```\n\n## License\nMIT\n\n## Authors\nEvgeniy Gribanov\n\n## FAQ\n### About Debug support\nIf you run Django in DEBUG mode, your EditorJS inherit this mode too. It means that you will have usefull messages in your browser console about Editor Configuration and work.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feijawa%2Fdjango-editorjs-field","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feijawa%2Fdjango-editorjs-field","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feijawa%2Fdjango-editorjs-field/lists"}