пятница, 14 августа 2009 г.

TinyMCE + Django

Update: Это устаревшая статья. Основная статья здесь


1. Устанавливаем django-tinymce отсюда http://code.google.com/p/django-tinymce/
2. Поставить конфиги в settings.py как на говорится по указанной ссылке выше.
Я поставил такие:
TINYMCE_DEFAULT_CONFIG = dict(
theme = "advanced",
plugins = """
safari,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,
inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,
noneditable,visualchars,nonbreaking,xhtmlxtras,template,imagemanager,filemanager""",

theme_advanced_buttons1 = "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
theme_advanced_buttons2 = "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
theme_advanced_buttons3 = "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
theme_advanced_buttons4 = "insertlayer,moveforward,movebackward,absolute,|,styleprops,spellchecker,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,blockquote,pagebreak,|,insertfile,insertimage",
theme_advanced_toolbar_location = "top",
theme_advanced_toolbar_align = "left",
theme_advanced_statusbar_location = "bottom",
theme_advanced_resizing = True,

)
TINYMCE_SPELLCHECKER = True
TINYMCE_COMPRESSOR = True

3. Скачать tinymce отсюда http://tinymce.moxiecode.com/download.php
Скачать отсюда поддержку русского языка http://tinymce.moxiecode.com/download_i18n.php
Обязательно надо поставить галочку и нажать кнопку Download (а то там еще ссылка XML есть, это ссылка только для тех, кто хочет предложить свой вариант перевода)

Комментариев нет:

Отправить комментарий