Commit Graph

43 Commits

Author SHA1 Message Date
Piotr Maliński 372f2aeba2 Refactor imports. 2015-07-07 20:35:43 +02:00
Piotr Maliński 84798109a7 Revert "STATIC_URL changed "
This reverts commit 23b8a2ec14.
2015-06-07 19:25:06 +02:00
jdcaballerov 23b8a2ec14 STATIC_URL changed
STATIC_URL changed for static function
2015-05-11 17:50:38 -05:00
Piotr Maliński e8b9df963f Merge pull request #164 from ikresoft/master
Custom filebrowser url
2015-04-22 00:25:23 +02:00
Michael P. Jung dab485f40f Fix deprecation warning introduced in Django 1.7
Django 1.7 renamed django.forms.util to django.forms.utils. In order to silence the Deprecation warning a try-except block is needed.
2015-04-02 14:33:40 +02:00
Pavel Zaytsev 63b5a653d4 Links buttons not worked
Fix for show Links buttons in Full template config,
2015-01-27 15:23:01 +05:00
Enver Bisevac ec90263c82 remove print 2015-01-25 19:47:40 +01:00
Enver Bisevac b8ebd249c6 support for custom browser 2015-01-25 13:59:06 +01:00
helicopetr 978788fd17 Restore external-plugin-resources handling.
This change re-adds functionality for adding external plugin resources.
The resources, defined in the field, are passed to the widget, which
renders them into the data-external-plugin-resources attribute.

In ckeditor-init.js, this data attribute is read and the resources
are added to the CKEditor, using CKEditor.plugins.addExternal().
2014-12-12 11:18:27 +01:00
Kevin Ndung'u 41e2868292 Provide Link and Unlink buttons in default config
The Default config lacks the basic functionality of inserting links.
This adds these buttons in the default toolbar config
2014-11-20 13:03:10 +03:00
Simon Fransson a5f6d2fcad Added lazy JSON encoder in order to support i18n in CKEditor settings
A LazyEncoder has been implemented based on Djangos DjangoJSONEncoder,
rather than json.JSONEncoder, as described [here](https://docs.djangoproject.com/en/dev/topics/serialization/#serialization-formats-json)

This allows us to use `ugettext_lazy` (and other laze functions) in
`settings.py` which adds the possibility to localize strings for use
in the `CKEDITOR_CONFIGS` settings etc.

**Example**

    from django.utils.translation import ugettext_lazy as _

    CKEDITOR_CONFIGS = {
      'default': {
        'stylesSet': [
          { 'name': _('Lead') , 'element': 'p', 'attributes': { 'class': 'lead' } },
          ...
        ]
        ...
      }
2014-10-22 13:49:17 +02:00
Piotr Maliński 0e224b439c Make jQuery loading configurable.
CKEDITOR_JQUERY_URL becomes a required by default configuration variable.
2014-08-24 21:03:06 +02:00
Piotr Maliński 08a895bd3f Update jQuery URL. 2014-08-24 20:51:58 +02:00
Raffaele Colace 440cda35d2 ckeditor for inline admin bug fixed with jquery
Conflicts:
	ckeditor/templates/ckeditor/widget.html
2014-04-30 17:55:40 +04:00
helicopetr 2d23c9ef38 Add support for external plugin resource declarations.
This commit adds keyword arguments to fields.RichTextField that allow the
overriding of extraPlugins on a per-field basis, and that allow the declaration
of external plugin resources (using CKEDITOR.plugins.addExternal()).

This improves the implementation of CKEditor plugins in django apps,
because they can be hosted and deployed separately from the CKEditor sources.

As an example, here's how to define a custom RichTextField by just currying
the existing one's constructor with the new arguments:

    from django.utils.functional import curry

    extra_plugins = ['custom_plugin']
    external_plugin_resources=[('custom_plugin', '/custom_plugin_base/', 'plugin.js')]
    CustomRichTextField = curry(RichTextField, extra_plugins=extra_plugins, external_plugin_resources=external_plugin_resources)

The external_plugin_resources kwarg is a list of tuples that contain the same
information as the parameters to CKEDITOR.plugins.addExternal().
You may want to write "reverse('some_view')" for the second parameter.
If that fails due to circular imports, wrap the reverse call in a
SimpleLazyObject, like this:

    from django.utils.functional import SimpleLazyObject
    external_plugin_resources=[('custom_plugin', SimpleLazyObject(lambda: reverse('custom_plugin_view', kwargs=...) + 'some_relative_path/'), 'plugin.js')]
2014-02-28 08:44:32 +01:00
Sylvain Josserand 4498642676 Fix language stuck to English
On multi-language sites, the language is not properly selected for the interface.
2014-02-24 16:04:21 +08:00
riklaunim 0c9b2db217 Merge pull request #13 from horejsek/master
Allow to define filebrowserUploadUrl and filebrowserBrowseUrl by CKEDITOR_CONFIGS
2013-12-08 07:26:53 -08:00
Michal Horejsek cf09315cf6 Allow to define filebrowserUploadUrl and filebrowserBrowseUrl by CKEDITOR_CONFIGS 2013-12-07 16:45:09 +01:00
Piotr Maliński 172f467a03 [close #1] Fix unicode handling for Python 3 and Django versions >= 1.4.2. 2013-11-12 02:28:54 +01:00
Shaun Sephton 6907e7eabc "added Full and Basic toolbar options, defaults to Full" 2013-04-04 09:03:17 +02:00
Lihan Li cab87b7f0f Updated PEP8 code style 2013-03-17 16:55:02 +11:00
Lihan Li 6168bf76ec Replaced soon to be deprecated simplejson package 2013-03-17 16:54:34 +11:00
Lihan Li 7671768775 Updated creditor config to V4 format 2013-03-17 16:53:54 +11:00
Shaun Sephton 1e012f6fc2 use static url for ckeditor media serving 2012-04-22 14:30:18 +02:00
Shaun Sephton 6c7be8c979 merge sustainingtechnologies/master with cleanup(pep8) 2012-04-22 13:18:55 +02:00
shaunsephton 47bf5adf66 pep8 corrections 2012-04-20 17:34:39 +02:00
shaunsephton 113db7f89e reduced height removing redundant space 2012-04-20 17:27:54 +02:00
shaunsephton 3641160e05 use our own django style, width increased to flow nicely with default toolbar 2012-04-20 16:53:00 +02:00
Shaun Sephton 78f14da43a use template allowing for override 2011-09-28 13:26:30 +02:00
Shaun Sephton ccba00aad9 pep8 2011-08-30 12:31:49 +02:00
Vasili a710f2f3ac preventing settings from leaking between widget instances 2011-03-09 23:14:29 -08:00
shaunsephton ec4d5d3a95 better dict check 2010-12-09 14:03:48 +02:00
shaunsephton 66945344ff slight refactor. honour defaults 2010-12-09 13:43:29 +02:00
shaunsephton 41d3aa6159 merge 2010-12-09 13:14:10 +02:00
shaunsephton 158f2b84d4 better error message 2010-10-10 10:32:39 +02:00
Jeff Hui d826bb116e Restored defaults if no CKEDITOR_CONFIGS['default'] is provided. 2010-06-27 18:52:53 -04:00
Jeff Hui 696b24e3cf Renamed CKEDITOR_CONFIG setting to CKEDITOR_CONFIGS (pluralized).
Also deleted an extra newline.
2010-06-27 18:13:35 -04:00
Jeff Hui b100f177a2 Removed default values for CKEDITOR_CONFIG.
Also added an exception if the CKEDITOR_CONFIG value is not a dictionary type.
2010-06-27 18:11:17 -04:00
Jeff Hui 59a73e7f3c Added CKEDITOR_CONFIG setting.
This setting allows custom CKEditor configuration settings to be passed
to the editor before being created. The design is based off of dwaiter's
django-ckeditor.
2010-06-27 18:04:05 -04:00
shaunsephton afff8e8f8d better media settings error 2010-06-22 13:05:56 +02:00
Shaun Sephton fd1ed4cdd8 now uses media prefix and browser 2010-04-01 09:41:14 +02:00
Shaun Sephton 512d34bede some docs and a reverse 2010-03-31 17:05:15 +02:00
Shaun Sephton e5184ee6a0 first commit 2010-03-31 16:46:17 +02:00