| django_ckeditorfiles. ckeditor bundled App Django Staticfiles |
הורד עכשיו |
django_ckeditorfiles. דירוג וסיכום
- שם המפרסם:
- Espen Angell Kristiansen
- אתר האינטרנט של המוציא לאור:
- http://devilry.github.com
django_ckeditorfiles. תגים
django_ckeditorfiles. תיאור
Django_ckeditorfiles הוא ckeditor bundled כמו django app.installpip להתקין ckEditorfilessetupadd 'ckeditorfiles' ו 'django.contrib.staticfiles' כדי להתקין_App.ckeditor.jsthe כל קוד המקור של ckeditor הוא סטטי / ckeditorfiles /. זה אומר שאתה יכול לכלול את המקורות בתבניות שלך באמצעות: {% טען staticfiles%} ( אתה לא צריך לעשות את זה אם אתה משתמש ckeditorwidget) ckeditorfiles.widgets.ckeditorwidgetckeditorwidget היא תת subclass של django.forms.widgets.textarea. זה כולל באופן אוטומטי ckeditor.js, ומוסיף: ckeditor.replace (מזהה, config); לאחר textarea. ID הוא מזהה של textarea, והתצורה היא פרמטר התצורה לבנאי של יישומון, מקודד כמו JSON.exampamplefrom Django ייבוא Formsfrom Ckeditorfiles.widgets ייבוא CkEditorwidgetfrom מודלים ייבוא PageClass Pageform (Transs.modelform): הגוף = טופס. יישומון = CKEditorWidget (config = { 'סרגל הכלים': 'בסיסי', 'גובה': '300px'})) בכיתה Meta: מודל = PageThe config פרמטר CKEditorWidget הוא הפרמטר config עבור CKEDITOR.replace (...). : : Beal_config = {'סרגל הכלים': 'בסיסי', 'גובה': '300px'} תכונה ברירת המחדל של Sefult_Config מספקת ברירות מחדל שניתן לדרוש עם פרמטר תצורה עבור __init__, כך שתוכל לעקוף את תצורת הגובה של ככה: widget = myckeditorwidget (config = {'גובה': '100px'}) דף הבית של המוצר
django_ckeditorfiles. תוכנה קשורה