bnzk / django-ckeditor-link

link plugin for ckeditor, based on django modelforms/modeladmin, allowing direct linking to your models, or whatever
GNU General Public License v2.0
2 stars 2 forks source link

convert multi widgets data attributes in python #23

Open benzkji opened 5 years ago

benzkji commented 5 years ago

use a config, for mapping multi widgets and other special cases.

for example the django-cms PageField:

CK...CONFIG = {'cms_page': '{cms_page_2}'}
benzkji commented 5 years ago
# a default, working with the provided contrib link_model
CKEDITOR_LINK_ATTR_MODIFIERS = getattr(
    settings,
    'CKEDITOR_LINK_ATTR_MODIFIERS', {
        'cms_page': '{cms_page_2}'
    }
)
benzkji commented 2 years ago

modifiers could also be callables, right, couldn't they?!