Skip to content

Custom toolbar config for single admin field #511

Open
@afk-mario

Description

@afk-mario

I tried setting the widget attributes field but didn't work

@admin.register(Us)
class UsAdmin(SingletonModelAdmin, SummernoteModelAdmin):
    class Meta:
        model = Us
        widgets = {
            "text": SummernoteWidget(
                attrs={
                    "summernote": {
                        "toolbar": [
                            ["style", ["style"]],
                            ["font", ["bold", "italic", "underline", "clear"]],
                            ["para", ["ul", "ol", "paragraph"]],
                            ["insert", ["link", "picture"]],
                            ["view", ["fullscreen", "codeview", "help"]],
                        ],
                    }
                }
            ),
        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions