AcesHigh is a Django application designed to integrate the ACE editor into Django forms seamlessly.
- Customizable ACE editor settings
- Support for multiple ACE editor themes and modes
- Snippet management with tagging support
- Fullscreen editor toggle
- Snippet search
- Public snippet sharing with an API
- Python 3.12+
- Django 5.0+
- django-crispy-forms
- django-crispy-bootstrap5
- django-taggit
- djangorestframework
For use in Wagtail you'll of course have to install Wagtail as well.
Current version is 0.1.0 and considered pre-alpha.
You can define default settings for ACE Editors, like font-size, theme & custom CSS.
You can define snippets with fancy autocomplete for faster coding.
You can specify specific theme, font-size and css per mode.
You can use the editor as a model field in Wagtail as well.
There is three icons above each editor:
- Click here to see an info panel about the editor; what mode it's using, the theme etc.
- Clicking on the gear icon will take you to the edit page of the editor mode profile
- Clicking on the expanding arrows enter fullscreen mode.
-
Install the package:
pip install git+https://github.com/weholt/aceshigh.git
-
Add
aceshigh
and its dependencies to yourINSTALLED_APPS
insettings.py
:INSTALLED_APPS = [ ... 'crispy_forms', 'crispy_bootstrap5', 'taggit', 'rest_framework', 'aceshigh', ] CRISPY_ALLOWED_TEMPLATE_PACKS = "bootstrap5" CRISPY_TEMPLATE_PACK = "bootstrap5"
-
Include the AcesHigh URLs in your
urls.py
:from django.urls import include, path urlpatterns = [ ... path('aceshigh/', include('aceshigh.urls')), ]
This project is licensed under the GNU Affero General Public License v3.0 or later (AGPL-3.0-or-later).
- ACE Editor
- Wagtail ACE Editor for inspiration.
- django-ace for inspiration.
- django-ace (fork) for inspiration.
Besides the ACE editor project itself, no code was used (so far) from any of the other projects.
- BUG: Going fullscreen makes the snippets appear behind the editor
- BUG: Keybinding does not work yet.
- Missing feature: Wagtail streamfield is not working, but coming soon.
- Missing feature: custom fonts
Define a model using the custom AceEditorField
:
# filename: models.py
from django.db import models
from .fields import AceEditorField
class YourModel(models.Model):
content = AceEditorField()
from wagtail.models import Page
from wagtail.admin.panels import FieldPanel
from aceshigh.fields import AceEditorField
class HomePage(Page):
content = AceEditorField(mode='html', null=True, blank=True)
css_content = AceEditorField(mode='css', null=True, blank=True)
js_content = AceEditorField(mode='javascript', null=True, blank=True)
python_content = AceEditorField(mode='python', null=True, blank=True)
markdown_content = AceEditorField(mode='markdown', null=True, blank=True)
content_panels = Page.content_panels + [
FieldPanel('content'),
FieldPanel('css_content'),
FieldPanel('js_content'),
FieldPanel('python_content'),
FieldPanel('markdown_content'),
]