Skip to content

Commit

Permalink
fix: wysiwyg docs and styling
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasvinclav committed May 20, 2023
1 parent 0e152b9 commit ff30ccb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def badge_callback(request):
```python
from django import models
from django.contrib import admin

from django.db import models
from unfold.admin import ModelAdmin
from unfold.contrib.forms.widgets import WysiwygWidget

Expand All @@ -248,7 +248,9 @@ class CustomAdminClass(ModelAdmin):
actions_submit_line = [] # Displayed near save in object detail

formfield_overrides = {
models.TextField: WysiwygWidget,
models.TextField: {
"widget": WysiwygWidget,
}
}
```

Expand Down
2 changes: 1 addition & 1 deletion src/unfold/static/unfold/css/styles.css

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion src/unfold/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@
PROSE_CLASSES = [
"font-normal",
"prose-sm",
"prose-blockquote:border-l-4",
"prose-blockquote:not-italic",
"prose-pre:bg-gray-50",
"prose-pre:rounded",
"prose-headings:font-medium",
"prose-a:text-primary-600",
"prose-a:underline",
Expand All @@ -96,8 +99,9 @@
"prose-ol:list-decimal",
"prose-ul:list-disc",
"prose-strong:text-gray-700",
"dark:prose-pre:bg-gray-800",
"dark:prose-blockquote:border-gray-700",
"dark:prose-blockquote:text-gray-200",
"dark:prose-blockquote:text-gray-400",
"dark:prose-headings:text-gray-200",
"dark:prose-strong:text-gray-200",
]
Expand Down

0 comments on commit ff30ccb

Please sign in to comment.