{"id":23197230,"url":"https://github.com/jsnjack/django-ckeditor4","last_synced_at":"2026-06-29T07:32:11.037Z","repository":{"id":12776882,"uuid":"15450386","full_name":"jsnjack/django-ckeditor4","owner":"jsnjack","description":"Django-ckeditor fork","archived":false,"fork":false,"pushed_at":"2014-07-04T12:29:20.000Z","size":5513,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-05T08:43:44.566Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jsnjack.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","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":"2013-12-26T10:08:10.000Z","updated_at":"2014-07-01T16:25:23.000Z","dependencies_parsed_at":"2022-09-02T12:50:50.125Z","dependency_job_id":null,"html_url":"https://github.com/jsnjack/django-ckeditor4","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jsnjack/django-ckeditor4","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsnjack%2Fdjango-ckeditor4","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsnjack%2Fdjango-ckeditor4/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsnjack%2Fdjango-ckeditor4/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsnjack%2Fdjango-ckeditor4/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jsnjack","download_url":"https://codeload.github.com/jsnjack/django-ckeditor4/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsnjack%2Fdjango-ckeditor4/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34918101,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-29T02:00:05.398Z","response_time":58,"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":[],"created_at":"2024-12-18T14:29:24.397Z","updated_at":"2026-06-29T07:32:11.018Z","avatar_url":"https://github.com/jsnjack.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Custom CKEditor\n\n\nDjango CKEditor\n================\n**Django admin CKEditor integration.**\n\nProvides a ``RichTextField`` and ``CKEditorWidget`` utilizing CKEditor with image upload and browsing support included.\n\n.. contents:: Contents\n    :depth: 5\n\nInstallation\n------------\n\nRequired\n~~~~~~~~\n#. Install or add django-ckeditor to your python path.\n\n#. Add ``ckeditor`` to your ``INSTALLED_APPS`` setting.\n\n#. Add a CKEDITOR_UPLOAD_PATH setting to the project's ``settings.py`` file. This setting specifies an absolute filesystem path to your CKEditor media upload directory. Make sure you have write permissions for the path, i.e.::\n\n    CKEDITOR_UPLOAD_PATH = \"/home/media/media.lawrence.com/uploads\"\n\n#. Run the ``collectstatic`` management command: ``$ /manage.py collectstatic``. This'll copy static CKEditor require media resources into the directory given by the ``STATIC_ROOT`` setting. See `Django's documentation on managing static files \u003chttps://docs.djangoproject.com/en/dev/howto/static-files\u003e`_ for more info.\n\n#. Add CKEditor URL include to your project's ``urls.py`` file::\n    \n    (r'^ckeditor/', include('ckeditor.urls')),    \n\nOptional\n~~~~~~~~\n#. Set the CKEDITOR_RESTRICT_BY_USER setting to ``True`` in the project's ``settings.py`` file (default ``False``). This restricts access to uploaded images to the uploading user (e.g. each user only sees and uploads their own images). Superusers can still see all images. **NOTE**: This restriction is only enforced within the CKEditor media browser. \n\n#. Add a CKEDITOR_UPLOAD_PREFIX setting to the project's ``settings.py`` file. This setting specifies a URL prefix to media uploaded through CKEditor, i.e.::\n\n       CKEDITOR_UPLOAD_PREFIX = \"http://media.lawrence.com/media/ckuploads/\n       \n   (If CKEDITOR_UPLOAD_PREFIX is not provided, the media URL will fall back to MEDIA_URL with the difference of MEDIA_ROOT and the uploaded resource's full path and filename appended.)\n\n#. Add a CKEDITOR_CONFIGS setting to the project's ``settings.py`` file. This specifies sets of CKEditor settings that are passed to CKEditor (see CKEditor's `Setting Configurations \u003chttp://docs.cksource.com/CKEditor_3.x/Developers_Guide/Setting_Configurations\u003e`_), i.e.::\n\n       CKEDITOR_CONFIGS = {\n           'awesome_ckeditor': {\n               'toolbar': 'Basic',\n           },\n       }\n   \n   The name of the settings can be referenced when instantiating a RichTextField::\n\n       content = RichTextField(config_name='awesome_ckeditor')\n\n   The name of the settings can be referenced when instantiating a CKEditorWidget::\n\n       widget = CKEditorWidget(config_name='awesome_ckeditor')\n   \n   By specifying a set named ``default`` you'll be applying its settings to all RichTextField and CKEditorWidget objects for which ``config_name`` has not been explicitly defined ::\n       \n       CKEDITOR_CONFIGS = {\n           'default': {\n               'toolbar': 'Full',\n               'height': 300,\n               'width': 300,\n           },\n       }\n\nUsage\n-----\n\nField\n~~~~~\nThe quickest way to add rich text editing capabilities to your models is to use the included ``RichTextField`` model field type. A CKEditor widget is rendered as the form field but in all other regards the field behaves as the standard Django ``TextField``. For example::\n\n    from django.db import models\n    from ckeditor.fields import RichTextField\n\n    class Post(models.Model):\n        content = RichTextField()\n\n\nWidget\n~~~~~~\nAlernatively you can use the included ``CKEditorWidget`` as the widget for a formfield. For example::\n\n    from django import forms\n    from django.contrib import admin\n    from ckeditor.widgets import CKEditorWidget\n\n    from post.models import Post\n\n    class PostAdminForm(forms.ModelForm):\n        content = forms.CharField(widget=CKEditorWidget())\n        class Meta:\n            model = Post\n\n    class PostAdmin(admin.ModelAdmin):\n        form = PostAdminForm\n    \n    admin.site.register(Post, PostAdmin)\n\nManagment Commands\n~~~~~~~~~~~~~~~~~~\nIncluded is a management command to create thumbnails for images already contained in ``CKEDITOR_UPLOAD_PATH``. This is useful to create thumbnails when starting to use django-ckeditor with existing images. Issue the command as follows::\n    \n    $ ./manage.py generateckeditorthumbnails\n\n**NOTE**: If you're using custom views remember to include ckeditor.js in your form's media either through ``{{ form.media }}`` or through a ``\u003cscript\u003e`` tag. Admin will do this for you automatically. See `Django's Form Media docs \u003chttp://docs.djangoproject.com/en/dev/topics/forms/media/\u003e`_ for more info.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsnjack%2Fdjango-ckeditor4","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjsnjack%2Fdjango-ckeditor4","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsnjack%2Fdjango-ckeditor4/lists"}