integrate tiptap text editor

This commit is contained in:
bkfox
2024-04-30 18:29:34 +02:00
parent 55123c386d
commit 93fba2d46d
21 changed files with 327 additions and 149 deletions

View File

@ -77,99 +77,6 @@ except Exception:
# -- django-taggit
TAGGIT_CASE_INSENSITIVE = True
# -- django-CKEditor
CKEDITOR_CONFIGS = {
"default": {
"format_tags": "h1;h2;h3;p;pre",
# 'skin': 'office2013',
"toolbar_Custom": [
{
"name": "editing",
"items": [
"Undo",
"Redo",
"-",
"Find",
"Replace",
"-",
"Source",
],
},
{
"name": "basicstyles",
"items": [
"Bold",
"Italic",
"Underline",
"Strike",
"Subscript",
"Superscript",
"-",
"RemoveFormat",
],
},
{
"name": "paragraph",
"items": [
"NumberedList",
"BulletedList",
"-",
"Outdent",
"Indent",
"-",
"Blockquote",
"CreateDiv",
"-",
"JustifyLeft",
"JustifyCenter",
"JustifyRight",
"JustifyBlock",
"-",
],
},
"/",
{"name": "links", "items": ["Link", "Unlink", "Anchor"]},
{
"name": "insert",
"items": [
"Image",
"Table",
"HorizontalRule",
"SpecialChar",
"PageBreak",
"Iframe",
],
},
{
"name": "styles",
"items": ["Styles", "Format", "Font", "FontSize"],
},
{"name": "colors", "items": ["TextColor", "BGColor"]},
"/", # put this to force next toolbar on new line
],
"toolbar": "Custom",
"extraPlugins": ",".join(
[
"uploadimage",
"div",
"autolink",
"autoembed",
"embedsemantic",
"embed",
"iframe",
"iframedialog",
"autogrow",
"widget",
"lineutils",
"dialog",
"dialogui",
"elementspath",
]
),
},
}
CKEDITOR_UPLOAD_PATH = "uploads/"
# -- easy_thumbnails
THUMBNAIL_PROCESSORS = (
@ -190,8 +97,6 @@ INSTALLED_APPS = (
"rest_framework",
"django_filters",
"content_editor",
"ckeditor",
"ckeditor_uploader",
"easy_thumbnails",
"filer",
"taggit",