Giter VIP home page Giter VIP logo

django-ckeditor's Issues

Many problems not solver with 4.4.4

Hi men, i updated your package, and i see that now we can config better this apps, but, we have the next problems.

First, my settings config are this:

CKEDITOR_CONFIGS = {
    'default': {
        #'skin': 'office2013',
        'toolbar': [
            { 'name': 'document', 'groups': [ 'mode', 'document', 'doctools' ], 'items': [ 'Source', '-', 'Save', 'NewPage', 'Preview', 'Print', '-', 'Templates' ] },
            { 'name': 'clipboard', 'groups': [ 'clipboard', 'undo' ], 'items': [ 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo' ] },
            { 'name': 'editing', 'groups': [ 'find', 'selection', 'spellchecker' ], 'items': [ 'Find', 'Replace', '-', 'SelectAll', '-', 'Scayt' ] },
            { 'name': 'forms', 'items': [ 'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField' ] },
            '/',
            { 'name': 'basicstyles', 'groups': [ 'basicstyles', 'cleanup' ], 'items': [ 'Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat' ] },
            { 'name': 'paragraph', 'groups': [ 'list', 'indent', 'blocks', 'align', 'bidi' ], 'items': [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote', 'CreateDiv', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock', '-', 'BidiLtr', 'BidiRtl', 'Language' ] },
            { 'name': 'links', 'items': [ 'Link', 'Unlink', 'Anchor' ] },
            { 'name': 'insert', 'items': [ 'Image', 'Flash', 'Table', 'HorizontalRule', 'Smiley', 'SpecialChar', 'PageBreak', 'Iframe' ] },
            '/',
            { 'name': 'styles', 'items': [ 'Styles', 'Format', 'Font', 'FontSize' ] },
            { 'name': 'colors', 'items': [ 'TextColor', 'BGColor' ] },
            { 'name': 'tools', 'items': [ 'Maximize', 'ShowBlocks' ] },
            { 'name': 'others', 'items': [ '-' ] },
            { 'name': 'about', 'items': [ 'About' ] }
        ],
        'width': 650,
        'language': 'es',
        'toolbarCanCollapse' : 'true',
        'toolbarGropus':[
            { 'name': 'document', 'groups': [ 'mode', 'document', 'doctools' ] },
            { 'name': 'clipboard', 'groups': [ 'clipboard', 'undo' ] },
            { 'name': 'editing', 'groups': [ 'find', 'selection', 'spellchecker' ] },
            { 'name': 'forms' },
            '/',
            { 'name': 'basicstyles', 'groups': [ 'basicstyles', 'cleanup' ] },
            { 'name': 'paragraph', 'groups': [ 'list', 'indent', 'blocks', 'align', 'bidi' ] },
            { 'name': 'links' },
            { 'name': 'insert' },
            '/',
            { 'name': 'styles' },
            { 'name': 'colors' },
            { 'name': 'tools' },
            { 'name': 'others' },
            { 'name': 'about' }
        ],
    },
}

As you can see, firts, isn't possible user other skins, if i cut the #, ckeditor can't see by us, very bad.

Then, 'toolbarGropus' can't be config. Yes, is i cut the toolbar config, we can't see anything, don't works. Only works toolbarconfig.

And, in the last, many toolbar icons don't appear in the toolbar, see!
problemas con ckeditr

Is very good can now using most completly toolbar, but, without icons, don't works for the people.

Oh, yes, as can you see, now, ckeditor form aren't allign with other field, he have a offside, and, this is very bad in django-suit.

Thank you!

Full package

You should put full package of creditor, I think this is standard, some buttons are not showing, so I download full package and buttons shows

image upload problem

Hi,
I have set my media path as :
MEDIA_ROOT = '/home/gumuskaya/webapps/uploads_gizem_web/'
CKEDITOR_UPLOAD_PATH = MEDIA_ROOT
CKEDITOR_UPLOAD_PREFIX = '/uploads/'
CKEDITOR_MEDIA_PREFIX = '/uploads'

MEDIA_URL = '/uploads/'

Image is uploaded but it gets wrong path when serving... The path must be /uploads/image_file...
but i get /home/gumuskaya/webapps/uploads_gizem_web/image_file.

Is there something that i am doing wrong?

v4.4.4 don't works

Only show the default textarea in the admin section using RichTextField. It's works in v4.0.2 and Django 1.6 but not initialize ckeditor in the current version.

In javascript console I have the error:
Uncaught TypeError: undefined is not a function ckeditor-init.js:1 (anonymous function)

I don't use the CKEDITOR_JQUERY_URL because the jquery is loaded with django (/static/admin/js/jquery.js). If I use the value '//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js' the textarea disappear.

Any idea?

Update to 4.4.4 from 4.4.0 fails

I just tried updating from 4.4.0 to 4.4.4 but ckeditor is no longer working. I added the new CKEDITOR_JQUERY_URL variable to settings.py but that didn't solve it, is there anything else that has changed?

Support for multiple image handling libraries

Pillow sometimes may make problems. Check if Pystacia, python imagemagick libraries can be used as backends too. If so refactor current Pillow usage to a backend and then write other backends.

Exception on pseudo-image upload

When i upload this sample file [1] with image upload dialog - i got exception on server. Upload interface because of exception does not give any informative error message.

The file is image renamed to .doc.
[1] - https://yadi.sk/i/j7c35vXKZHad3

127.0.0.1 - - [08/Aug/2014 15:49:10] "POST /en/ckeditor/upload/?CKEditor=id_grounds_en&CKEditorFuncNum=0&langCode=en HTTP/1.1" 500 -
Traceback (most recent call last):
  File "/home/u1/.virtualenvs/exmo/lib/python2.7/site-packages/django/contrib/staticfiles/handlers.py", line 72, in __call__
return self.application(environ, start_response)
  File "/home/u1/.virtualenvs/exmo/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 255, in __call__
    response = self.get_response(request)
  File "/home/u1/.virtualenvs/exmo/lib/python2.7/site-packages/django/core/handlers/base.py", line 178, in get_response
    response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
  File "/home/u1/.virtualenvs/exmo/lib/python2.7/site-packages/django/core/handlers/base.py", line 217, in handle_uncaught_exception
    return debug.technical_500_response(request, *exc_info)
  File "/home/u1/.virtualenvs/exmo/lib/python2.7/site-packages/django_extensions/management/technical_response.py", line 5, in null_technical_500_response
    six.reraise(exc_type, exc_value, tb)
  File "/home/u1/.virtualenvs/exmo/lib/python2.7/site-packages/django/core/handlers/base.py", line 115, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/home/u1/.virtualenvs/exmo/lib/python2.7/site-packages/django/contrib/auth/decorators.py", line 25, in _wrapped_view
    return view_func(request, *args, **kwargs)
  File "/home/u1/.virtualenvs/exmo/lib/python2.7/site-packages/django/views/decorators/csrf.py", line 77, in wrapped_view
    return view_func(*args, **kwargs)
  File "/home/z/pproj/exmo2010/exmo/exmo2010/views.py", line 248, in ckeditor_upload
    return upload(request)
  File "/home/u1/.virtualenvs/exmo/lib/python2.7/site-packages/django/views/decorators/csrf.py", line 77, in wrapped_view
    return view_func(*args, **kwargs)
  File "/home/u1/.virtualenvs/exmo/lib/python2.7/site-packages/ckeditor/views.py", line 62, in upload
    backend.create_thumbnail(saved_path)
  File "/home/u1/.virtualenvs/exmo/lib/python2.7/site-packages/ckeditor/image/pillow_backend.py", line 38, in create_thumbnail
    imagefit.save(thumbnail_io, format=file_format)
  File "/home/u1/.virtualenvs/exmo/lib/python2.7/site-packages/PIL/Image.py", line 1456, in save
    save_handler = SAVE[format.upper()] # unknown format
KeyError: 'MSWORD'

look up uploaded image

Hi riklaunim,
I got a problem in scanning server to look up the uploaded image.
If login as superuser, then no problem. All uploaded images were shown.
If login as non-superuser, then no images were found.
I checked the source file, ckeditor/views.py
and changed the line 96:
directory_path = os.path.join(path, directory)
to:
directory_path = os.path.join(user_path, path, directory)

and the problem seems to be solved.
But I don't know whether it will cause any other errors.

Thank you!

CKEDITOR_CONFIGS

When entering settings in CKEDITOR_CONFIGS. Take care for true, false values.
For instance :
'allowedContent' : 'true',
'entities' : 'false',
'entities_latin' : 'false',

These will not be recognized by ckeditor.
You can work around this using a custom settings file:

CKEDITOR_CONFIGS = {
'default' : {
...
},
'richeditor': {
'customConfig': '/static/cms/content/htmlcontent/richeditor/config.js',
},
}

when i try to upload an image by admin , it has the csrf problem and upload failed.

below is my urls.py
urlpatterns = [ url(r'^admin/', include(admin.site.urls)), url(r'^', 'article.views.home'), url(r'^ckeditor/', include('ckeditor_uploader.urls')), ]

below is the settings
`
MEDIA_ROOT = '/home/sisi/webblog/media/'

MEDIA_URL = '/media/'

STATIC_URL = '/static/'

STATIC_ROOT = '/home/sisi/webblog/static'

ckeditor settings

CKEDITOR_JQUERY_URL = '//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js'
CKEDITOR_UPLOAD_PATH = 'uploads/'
CKEDITOR_IMAGE_BACKEND = 'pillow'
`

where is the problem. how can i fix it . I want to build my own blog. and use the admin to write the blog.

Bad Request on file upload

Browsing the media gallery or uploading a new image results in a server error
400 Bad Request.

I'm guessing this is a configuration error as it worked before and I just upgraded to django-ckeditor-updated on the production server but as of yet I don't know what causes this. As soon as I find out, we should improve the error handling.

Ckeditor inline

If you have inlines, and this doesn't matter if you added the fields via widget or model, still same thing occurs. The ckeditor iframe body is not initiated appropriately, normally it looks like this:

<body contenteditable="true" class="cke_editable cke_editable_themed cke_contents_ltr cke_show_borders" spellcheck="false"><p><br></p></body>

instead you get only:

<body></body>

This is if you use inlines only and use the "add another object" button in the admin i.e.

class TeamMemberInline(admin.StackedInline):
model = TeamMember
extra = 0

class BiosAdmin(admin.ModelAdmin):
inlines = (TeamMemberInline, )
list_display = ('title', )

So when you click "add another team member" in the django admin for bio, it adds it and looks like its a ckeditor widget but it isn't editable.

How to config protectedSource for placeholders

Whats is the way to config django-ckeditor for 'protect' django placeholders on templates
edited with CKEditor.

Example:

protectedSource.push(/{%[\s\S]*?%}/g) thus protect placeholders like :

  • {% for item in items %}
  • {% endfor %}

Collectstatic don't works with .egg

Hi, i'm install ckeditor in my webserver and him install all packages as a .eggs, when i do manage.py collectstatic, don't take any ckeditor's static files and this make ma an error in the server, what can i do?

Then i have this

Internal Server Error: /admin/news/new/97/
Traceback (most recent call last):
File "/home/salahaddinal/webapps/tiempoturco/lib/python3.4/django/core/handlers/base.py", line 137, in get_response
response = response.render()
File "/home/salahaddinal/webapps/tiempoturco/lib/python3.4/django/template/response.py", line 103, in render
self.content = self.rendered_content
File "/home/salahaddinal/webapps/tiempoturco/lib/python3.4/django/template/response.py", line 80, in rendered_content
content = template.render(context)
File "/home/salahaddinal/webapps/tiempoturco/lib/python3.4/django/template/base.py", line 148, in render
return self._render(context)
File "/home/salahaddinal/webapps/tiempoturco/lib/python3.4/django/template/base.py", line 142, in _render
return self.nodelist.render(context)
File "/home/salahaddinal/webapps/tiempoturco/lib/python3.4/django/template/base.py", line 844, in render
bit = self.render_node(node, context)
File "/home/salahaddinal/webapps/tiempoturco/lib/python3.4/django/template/debug.py", line 80, in render_node
return node.render(context)
File "/home/salahaddinal/webapps/tiempoturco/lib/python3.4/django/template/loader_tags.py", line 126, in render
return compiled_parent._render(context)
File "/home/salahaddinal/webapps/tiempoturco/lib/python3.4/django/template/base.py", line 142, in _render
return self.nodelist.render(context)
File "/home/salahaddinal/webapps/tiempoturco/lib/python3.4/django/template/base.py", line 844, in render
bit = self.render_node(node, context)
File "/home/salahaddinal/webapps/tiempoturco/lib/python3.4/django/template/debug.py", line 80, in render_node
return node.render(context)
File "/home/salahaddinal/webapps/tiempoturco/lib/python3.4/django/template/loader_tags.py", line 126, in render
return compiled_parent._render(context)
File "/home/salahaddinal/webapps/tiempoturco/lib/python3.4/django/template/base.py", line 142, in _render
return self.nodelist.render(context)
File "/home/salahaddinal/webapps/tiempoturco/lib/python3.4/django/template/base.py", line 844, in render
bit = self.render_node(node, context)
File "/home/salahaddinal/webapps/tiempoturco/lib/python3.4/django/template/debug.py", line 80, in render_node
return node.render(context)
File "/home/salahaddinal/webapps/tiempoturco/lib/python3.4/django/template/loader_tags.py", line 65, in render
result = block.nodelist.render(context)
File "/home/salahaddinal/webapps/tiempoturco/lib/python3.4/django/template/base.py", line 844, in render
bit = self.render_node(node, context)
File "/home/salahaddinal/webapps/tiempoturco/lib/python3.4/django/template/debug.py", line 80, in render_node
return node.render(context)
File "/home/salahaddinal/webapps/tiempoturco/lib/python3.4/django/template/loader_tags.py", line 65, in render
result = block.nodelist.render(context)
File "/home/salahaddinal/webapps/tiempoturco/lib/python3.4/django/template/base.py", line 844, in render
bit = self.render_node(node, context)
File "/home/salahaddinal/webapps/tiempoturco/lib/python3.4/django/template/debug.py", line 80, in render_node
return node.render(context)
File "/home/salahaddinal/webapps/tiempoturco/lib/python3.4/django/template/loader_tags.py", line 65, in render
result = block.nodelist.render(context)
File "/home/salahaddinal/webapps/tiempoturco/lib/python3.4/django/template/base.py", line 844, in render
bit = self.render_node(node, context)
File "/home/salahaddinal/webapps/tiempoturco/lib/python3.4/django/template/debug.py", line 80, in render_node
return node.render(context)
File "/home/salahaddinal/webapps/tiempoturco/lib/python3.4/django/template/loader_tags.py", line 65, in render
result = block.nodelist.render(context)
File "/home/salahaddinal/webapps/tiempoturco/lib/python3.4/django/template/base.py", line 844, in render
bit = self.render_node(node, context)
File "/home/salahaddinal/webapps/tiempoturco/lib/python3.4/django/template/debug.py", line 80, in render_node
return node.render(context)
File "/home/salahaddinal/webapps/tiempoturco/lib/python3.4/django/template/defaulttags.py", line 201, in render
nodelist.append(node.render(context))
File "/home/salahaddinal/webapps/tiempoturco/lib/python3.4/django/template/loader_tags.py", line 150, in render
return template.render(context)
File "/home/salahaddinal/webapps/tiempoturco/lib/python3.4/django/template/base.py", line 148, in render
return self._render(context)
File "/home/salahaddinal/webapps/tiempoturco/lib/python3.4/django/template/base.py", line 142, in _render
return self.nodelist.render(context)
File "/home/salahaddinal/webapps/tiempoturco/lib/python3.4/django/template/base.py", line 844, in render
bit = self.render_node(node, context)
File "/home/salahaddinal/webapps/tiempoturco/lib/python3.4/django/template/debug.py", line 80, in render_node
return node.render(context)
File "/home/salahaddinal/webapps/tiempoturco/lib/python3.4/django/template/defaulttags.py", line 201, in render
nodelist.append(node.render(context))
File "/home/salahaddinal/webapps/tiempoturco/lib/python3.4/django/template/defaulttags.py", line 527, in render
return self.nodelist.render(context)
File "/home/salahaddinal/webapps/tiempoturco/lib/python3.4/django/template/base.py", line 844, in render
bit = self.render_node(node, context)
File "/home/salahaddinal/webapps/tiempoturco/lib/python3.4/django/template/debug.py", line 80, in render_node
return node.render(context)
File "/home/salahaddinal/webapps/tiempoturco/lib/python3.4/django/template/defaulttags.py", line 201, in render
nodelist.append(node.render(context))
File "/home/salahaddinal/webapps/tiempoturco/lib/python3.4/django/template/defaulttags.py", line 402, in render
return strip_spaces_between_tags(self.nodelist.render(context).strip())
File "/home/salahaddinal/webapps/tiempoturco/lib/python3.4/django/template/base.py", line 844, in render
bit = self.render_node(node, context)
File "/home/salahaddinal/webapps/tiempoturco/lib/python3.4/django/template/debug.py", line 80, in render_node
return node.render(context)
File "/home/salahaddinal/webapps/tiempoturco/lib/python3.4/django/template/defaulttags.py", line 312, in render
return nodelist.render(context)
File "/home/salahaddinal/webapps/tiempoturco/lib/python3.4/django/template/base.py", line 844, in render
bit = self.render_node(node, context)
File "/home/salahaddinal/webapps/tiempoturco/lib/python3.4/django/template/debug.py", line 80, in render_node
return node.render(context)
File "/home/salahaddinal/webapps/tiempoturco/lib/python3.4/django/template/debug.py", line 93, in render
output = force_text(output)
File "/home/salahaddinal/webapps/tiempoturco/lib/python3.4/django/utils/encoding.py", line 83, in force_text
s = six.text_type(s)
File "/home/salahaddinal/webapps/tiempoturco/lib/python3.4/django/forms/forms.py", line 508, in __str__
return self.as_widget()
File "/home/salahaddinal/webapps/tiempoturco/lib/python3.4/django/forms/forms.py", line 560, in as_widget
return force_text(widget.render(name, self.value(), attrs=attrs))
File "/home/salahaddinal/lib/python3.4/django_ckeditor_updated-4.4.0-py3.4.egg/ckeditor/widgets.py", line 100, in render
'external_plugin_resources' : self.external_plugin_resources
File "/home/salahaddinal/webapps/tiempoturco/lib/python3.4/django/template/loader.py", line 170, in render_to_string
t = get_template(template_name, dirs)
File "/home/salahaddinal/webapps/tiempoturco/lib/python3.4/django/template/loader.py", line 144, in get_template
template, origin = find_template(template_name, dirs)
File "/home/salahaddinal/webapps/tiempoturco/lib/python3.4/django/template/loader.py", line 136, in find_template
raise TemplateDoesNotExist(name)
django.template.base.TemplateDoesNotExist: ckeditor/widget.html

and my configurations is it:

INSTALLED_APPS = (
    #'grappelli.dashboard',
    #'grappelli',
    'suit',
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'ckeditor',
    'django_extensions',
    'embed_video',
    'import_export',
    'permission',
    'rest_framework',
    'social.apps.django_app.default',
    'sorl.thumbnail',
    'authors',
    'gallery',
    'images',
    'keywords',
    'news',
    'subtopic',
    'topic',
    'videos',
)

STATICFILES_FINDERS = (
    'django.contrib.staticfiles.finders.FileSystemFinder',
    'django.contrib.staticfiles.finders.AppDirectoriesFinder',
)

#if DEBUG:
    #MEDIA_ROOT = os.sep.join(os.path.abspath(__file__).split(os.sep)[:-2] + ['statics/media'])
MEDIA_ROOT = '/home/.../tiempoturco_static/media'
    #STATIC_ROOT = os.sep.join(os.path.abspath(__file__).split(os.sep)[:-2] + ['statics/static_only'])
STATIC_ROOT = '/home/.../tiempoturco_static/static'
    #STATICFILES_DIRS = os.sep.join(os.path.abspath(__file__).split(os.sep)[:-2] + ['statics/static'])
STATICFILES_DIRS = (os.path.join(os.path.dirname(BASE_DIR), "tiempoturco", "statics", "static"),)

MEDIA_URL = '/static/media/'
STATIC_URL = '/static/static/'

TEMPLATE_DIRS = (
    #os.path.abspath(__file__).split(os.sep)[:-2] + ['static/templates']
    os.path.join(os.path.dirname(BASE_DIR), "tiempoturco", "statics", "templates"),
)

#CKEditor Options
CKEDITOR_UPLOAD_PATH = "/home/.../tiempoturco_static/media/uploads"
CKEDITOR_IMAGE_BACKEND = "pillow"
CKEDITOR_JQUERY_URL = '//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js'

CKEDITOR_CONFIGS = {
    'default': {
        'toolbar': 'null',
        'width': 650,
        'language': 'es',
        'toolbarCanCollapse' : 'true',
    },
}

MANIFEST.in not honoured during install phase

When installing django-ckeditor-updated from Pypi, static files and templates do not get copied to the installation directory.

If I switch to setuptools and enable include_package_data=True then all the assets get copied as expected.

diff --git a/setup.py b/setup.py
index 9f97b2c..9e7c08f 100644
--- a/setup.py
+++ b/setup.py
@@ -1,5 +1,5 @@
 import os.path
-from distutils.core import setup
+from setuptools import setup


 def get_source_files():
@@ -32,4 +32,5 @@ setup(
         "Intended Audience :: Developers",
         "Topic :: Internet :: WWW/HTTP :: Dynamic Content",
     ],
+    include_package_data=True,
 )

I could not see what is wrong with your current setup.py though. After reading distutils docs it seems fine but here with Python 3.3 it really doesn't install all required files.

Fetching Media from CKEditor Upload Path

Here are my settings, and note it does not matter if i specify CKEDITOR_UPLOAD_PREFIX in my settings or not, it loads the entire absolute path on the server side when trying to load the image instead of going to /media/ckeditor_uploads/... it uses /var/web/project_env/project_name/media ... which is the CKEDITOR_UPLOAD_PATH not the media url! This bug only exists in django 1.6 / python 3.3 when I tried with django 1.5.5 and python 2.7.3 it was fine..

CK Editor

CKEDITOR_UPLOAD_PATH = os.path.join(MEDIA_ROOT, "ckeditor_uploads")

CKEDITOR_UPLOAD_PREFIX = os.path.join(MEDIA_URL, "ckeditor_uploads")

Slugify unicode filenames

Django slugify cuts all non-ascii letters, so if filename for example "изображение.jpg" - it throws exception in pillow_backend on python thumbnail_format = utils.get_image_format(os.path.splitext(file_path)[1]), because filename is empty.
I propose to use package trans (https://github.com/zzzsochi/trans) for this.
Method slugify_filename could be:

def slugify_filename(filename):
    u""" Slugify filename """
    name, ext = os.path.splitext(filename)
    import trans
    name = unicode(name).encode('trans/slug')
    return name + ext

If you do not mind about adding additional dependencies, I could create a pull request for this.

Django 1.7b4 unexpected keyword argument 'max_length'

I do not have max_length set on RichTextFields but i get error:
...
File ".../Web/VIRTUAL_ENVIRONMENTS/django_python3.3/lib/python3.3/site-packages/django/db/models/fields/init.py", line 1887, in formfield
return super(TextField, self).formfield(**defaults)
File ".../Web/VIRTUAL_ENVIRONMENTS/django_python3.3/lib/python3.3/site-packages/django/db/models/fields/init.py", line 837, in formfield
return form_class(**defaults)
File ".../Web/VIRTUAL_ENVIRONMENTS/django_python3.3/lib/python3.3/site-packages/ckeditor/fields.py", line 28, in init
super(RichTextFormField, self).init(_args, *_kwargs)
TypeError: init() got an unexpected keyword argument 'max_length'

Ckeditor configs

Can you give us a full toolbar complete configuration?
I put toolbar full, but, don't works.

http://docs.ckeditor.com/#!/guide/dev_toolbar, this is very confusing

For example:

// Toolbar configuration generated automatically by the editor based on config.toolbarGroups.
config.toolbar = [
    { name: 'document', groups: [ 'mode', 'document', 'doctools' ], items: [ 'Source', '-', 'Save', 'NewPage', 'Preview', 'Print', '-', 'Templates' ] },
    { name: 'clipboard', groups: [ 'clipboard', 'undo' ], items: [ 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo' ] },
    { name: 'editing', groups: [ 'find', 'selection', 'spellchecker' ], items: [ 'Find', 'Replace', '-', 'SelectAll', '-', 'Scayt' ] },
    { name: 'forms', items: [ 'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField' ] },
    '/',
    { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ], items: [ 'Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat' ] },
    { name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ], items: [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote', 'CreateDiv', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock', '-', 'BidiLtr', 'BidiRtl', 'Language' ] },
    { name: 'links', items: [ 'Link', 'Unlink', 'Anchor' ] },
    { name: 'insert', items: [ 'Image', 'Flash', 'Table', 'HorizontalRule', 'Smiley', 'SpecialChar', 'PageBreak', 'Iframe' ] },
    '/',
    { name: 'styles', items: [ 'Styles', 'Format', 'Font', 'FontSize' ] },
    { name: 'colors', items: [ 'TextColor', 'BGColor' ] },
    { name: 'tools', items: [ 'Maximize', 'ShowBlocks' ] },
    { name: 'others', items: [ '-' ] },
    { name: 'about', items: [ 'About' ] }
];

// Toolbar groups configuration.
config.toolbarGroups = [
    { name: 'document', groups: [ 'mode', 'document', 'doctools' ] },
    { name: 'clipboard', groups: [ 'clipboard', 'undo' ] },
    { name: 'editing', groups: [ 'find', 'selection', 'spellchecker' ] },
    { name: 'forms' },
    '/',
    { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
    { name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ] },
    { name: 'links' },
    { name: 'insert' },
    '/',
    { name: 'styles' },
    { name: 'colors' },
    { name: 'tools' },
    { name: 'others' },
    { name: 'about' }
];

Same id field confusion

I have to use two model form on the same page. And both models have a description field with id_description... I want the second model form's description field to have ckeditor but it wraps the first one ... Can there be a solution on this?

How to install plugins

Hi, i need install plugin for caption imagen, but i create en my static folder dir ckeditor inside
this structure
.
└── ckeditor
└── plugins
├── dialog
│   ├── dialogDefinition.js
│   ├── plugin.js
│   └── samples
│   ├── assets
│   │   └── my_dialog.js
│   └── dialog.html
├── image2
│   ├── dev
│   │   ├── assets
│   │   │   ├── image1.jpg
│   │   │   └── image2.jpg
│   │   ├── contents.css
│   │   └── image2.html
│   ├── dialogs
│   │   └── image2.js
│   ├── icons
│   │   ├── hidpi
│   │   │   └── image.png
│   │   └── image.png
│   ├── lang
│   │   ├── af.js
│   │   ├── ar.js
│   │   ├── bg.js
│   │   ├── bn.js
│   │   ├── bs.js
│   │   ├── ca.js
│   │   ├── cs.js
│   │   ├── cy.js
│   │   ├── da.js
│   │   ├── de.js
│   │   ├── el.js
│   │   ├── en-au.js
│   │   ├── en-ca.js
│   │   ├── en-gb.js
│   │   ├── en.js
│   │   ├── eo.js
│   │   ├── es.js
│   │   ├── et.js
│   │   ├── eu.js
│   │   ├── fa.js
│   │   ├── fi.js
│   │   ├── fo.js
│   │   ├── fr-ca.js
│   │   ├── fr.js
│   │   ├── gl.js
│   │   ├── gu.js
│   │   ├── he.js
│   │   ├── hi.js
│   │   ├── hr.js
│   │   ├── hu.js
│   │   ├── id.js
│   │   ├── is.js
│   │   ├── it.js
│   │   ├── ja.js
│   │   ├── ka.js
│   │   ├── km.js
│   │   ├── ko.js
│   │   ├── ku.js
│   │   ├── lt.js
│   │   ├── lv.js
│   │   ├── mk.js
│   │   ├── mn.js
│   │   ├── ms.js
│   │   ├── nb.js
│   │   ├── nl.js
│   │   ├── no.js
│   │   ├── pl.js
│   │   ├── pt-br.js
│   │   ├── pt.js
│   │   ├── ro.js
│   │   ├── ru.js
│   │   ├── si.js
│   │   ├── sk.js
│   │   ├── sl.js
│   │   ├── sq.js
│   │   ├── sr.js
│   │   ├── sr-latn.js
│   │   ├── sv.js
│   │   ├── th.js
│   │   ├── tr.js
│   │   ├── tt.js
│   │   ├── ug.js
│   │   ├── uk.js
│   │   ├── vi.js
│   │   ├── zh-cn.js
│   │   └── zh.js
│   ├── plugin.js
│   └── samples
│   ├── assets
│   │   ├── image1.jpg
│   │   └── image2.jpg
│   └── image2.html
├── widget
│   ├── images
│   │   └── handle.png
│   ├── lang
│   │   ├── ar.js
│   │   ├── ca.js
│   │   ├── cs.js
│   │   ├── cy.js
│   │   ├── de.js
│   │   ├── el.js
│   │   ├── en-gb.js
│   │   ├── en.js
│   │   ├── eo.js
│   │   ├── es.js
│   │   ├── fa.js
│   │   ├── fi.js
│   │   ├── fr.js
│   │   ├── gl.js
│   │   ├── he.js
│   │   ├── hr.js
│   │   ├── hu.js
│   │   ├── it.js
│   │   ├── ja.js
│   │   ├── km.js
│   │   ├── ko.js
│   │   ├── nb.js
│   │   ├── nl.js
│   │   ├── no.js
│   │   ├── pl.js
│   │   ├── pt-br.js
│   │   ├── pt.js
│   │   ├── ru.js
│   │   ├── sl.js
│   │   ├── sv.js
│   │   ├── tt.js
│   │   ├── uk.js
│   │   ├── vi.js
│   │   ├── zh-cn.js
│   │   └── zh.js
│   └── plugin.js
└── youtube
├── images
│   └── icon.png
├── lang
│   ├── ar.js
│   ├── de.js
│   ├── en.js
│   ├── fr.js
│   ├── hu.js
│   ├── it.js
│   ├── ja.js
│   ├── nl.js
│   ├── pl.js
│   ├── pt.js
│   ├── ru.js
│   ├── tr.js
│   └── vi.js
└── plugin.js

but i find in ckeditor but but I do not see the plugins,
I need to activate!
which is the best way?

thank

Widget style attribute breaks layout

After updating from 4.2.8 to the latest 4.4.x release the widget appears indented. The widget's html has a div with style="margin-left: 106px". I am using CKEditorWidget in a non-admin view.

set full feature

Hi,
How to full feature my toolbar?
I need to justify alignment and pre tag for syntax highlighter.
please help me.
thanks

Image upload validation

  • disallow uploading of other file types, probably with configuration option.
  • disallow uploading files that slugify to empty string or other nonsense. (or use fallback name)

Django 1.6 & Python 3.3 installation error

$ pip install django-ckeditor-updated
Downloading/unpacking django-ckeditor-updated
  Downloading django-ckeditor-updated-4.2.2.tar.gz (1.1MB): 1.1MB downloaded
  Running setup.py egg_info for package django-ckeditor-updated

    warning: no files found matching '*.asp' under directory 'ckeditor/static'
    warning: no files found matching '*.php' under directory 'ckeditor/static'
    warning: no previously-included files matching '*' found under directory 'ckeditor/static/ckeditor/ckeditor/_samples'
Requirement already satisfied (use --upgrade to upgrade): Pillow in /Users/lorddaedra/Envs/expo3/lib/python3.3/site-packages (from django-ckeditor-updated)
Installing collected packages: django-ckeditor-updated
  Running setup.py install for django-ckeditor-updated

    warning: no files found matching '*.asp' under directory 'ckeditor/static'
    warning: no files found matching '*.php' under directory 'ckeditor/static'
    warning: no previously-included files matching '*' found under directory 'ckeditor/static/ckeditor/ckeditor/_samples'
      File "/Users/lorddaedra/Envs/expo3/lib/python3.3/site-packages/ckeditor/management/commands/generateckeditorthumbnails.py", line 16
        print "Creating thumbnail for %s" % image
                                        ^
    SyntaxError: invalid syntax

Successfully installed django-ckeditor-updated
Cleaning up...```

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.