helloflask / helloflask/flask-ckeditor

Using flask-ckeditor with flask-admin inline model?

Open
#42 3 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
203
Forks
67
PR merge metrics
No merged PRs in 30d

Description

I'm trying to use CKEditor in a Flask-Admin app, but where the field I need is in an inline model. In these cases, the Admin interface can generate any number of "add" forms, which will have `id` values like `tablename-0-fieldname`, `tablename-1-fieldname`, etc.

If I follow the general instructions for flask-admin integration, but set up my inline models in my ModelView subclass like:

`inline_models = [(Quotation, dict(form_overrides=dict(bibliography=CKEditorField)))]`

and then in my template:

`{{ ckeditor.load() }}`
`{{ ckeditor.config(name='bibliography') }}`

I end up with with a textarea that looks like:

``

However, this does not cause a CKEditor instance to exist. I note that there is no `

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.