emencia / emencia-django-newsletter

An app for sending newsletter by email to a contact list.
189 stars 72 forks source link

Addition of NEWSLETTER_USE_TINYMCE option #40

Closed ptoal closed 12 years ago

ptoal commented 13 years ago

Hi,

Instead of using the "admin override" hack, I added a NEWSLETTER_USE_TINYMCE option to enable use of TinyMCE. If the setting is True, but TinyMCE is not installed, an ImportError will occur. This could be taken care of via some try/except logic, but this solution is currently meeting my needs. Feel free to incorporate it in the master branch, if you like.

-PJT

mokoko commented 11 years ago

TinyMCE function is not working according to your TinyMCE option.

i changed newsletter.py, init.py and settings.py now it says "cannot import name NewsletterTinyMCEAdmin"

Before i changed those files, my editor was looking like the image below.

tinymce_problem

bittner commented 10 years ago

Just a hint: To make the editor toolbar appear more like in the tutorial video on the Emencia website add the following to your project settings:

TINYMCE_DEFAULT_CONFIG = {
    'height': 450,
    'width': 800,
    'convert_urls': False,
    'plugins': 'table,paste,searchreplace,template',
    'theme': 'advanced',
    'theme_advanced_toolbar_location': 'top',
    'theme_advanced_buttons1': 'bold,italic,underline,forecolor,|,justifyleft,justifycenter,justifyright,justifyfull,|,formatselect,|,template',
    'theme_advanced_buttons3_add': 'tablecontrols',
}

The template option provides a template chooser button, as demonstrated in the video at 2:18.

Kudos to @Fantomas42 for this!