Skip to content

Commit

Permalink
readme cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyle Rimkus committed May 24, 2012
1 parent 711c0b6 commit defe4b3
Showing 1 changed file with 42 additions and 22 deletions.
64 changes: 42 additions & 22 deletions README.markdown
Expand Up @@ -43,20 +43,6 @@ Add a `CKEDITOR_CONFIGS` variable to your `settings.py` with at least a
'linkShowTargetTab': False, 'linkShowTargetTab': False,
'linkShowAdvancedTab': False, 'linkShowAdvancedTab': False,
} }
, 'basic': {
'toolbar': [
[ 'Bold', 'Italic',
'-', 'Link', 'Unlink',
]
]
, 'width': 600
, 'height': 250
, 'toolbarCanCollapse': False
, 'toolbarLocation': 'bottom'
, 'resize_enabled': False
, 'removePlugins': 'elementspath'
, 'forcePasteAsPlainText': True
}
} }


Collect the static files: Collect the static files:
Expand Down Expand Up @@ -105,18 +91,24 @@ like this:
'default': { 'default': {
'toolbar': [ 'toolbar': [
[ 'Undo', 'Redo', [ 'Undo', 'Redo',
'-', 'Bold', 'Italic', 'Underline',
'-', 'Link', 'Unlink', 'Anchor',
'-', 'Format', '-', 'Format',
'-', 'SpellChecker', 'Scayt', '-', 'Bold', 'Italic', 'Underline',
'-', 'Maximize', '-', 'Link', 'Unlink',
'-', 'BulletedList', 'NumberedList',
], ],
[ 'SpellChecker', 'Scayt',
],
[ 'Image',
'-', 'PasteText','PasteFromWord',
'-', 'Source',
]
], ],
'width': 840, 'width': 655,
'height': 300, 'height': 250,
'toolbarCanCollapse': False, 'toolbarCanCollapse': False,
}, 'linkShowTargetTab': False,
'linkShowAdvancedTab': False,
}
, 'basic': { , 'basic': {
'toolbar': [ 'toolbar': [
[ 'Bold', 'Italic', [ 'Bold', 'Italic',
Expand Down Expand Up @@ -153,6 +145,34 @@ When setting up the `CKEditor` widget in your `Form` class you can pass a
You cannot use the `HTMLField` shortcut if you want to specify a custom config You cannot use the `HTMLField` shortcut if you want to specify a custom config
-- you *must* create a form. -- you *must* create a form.


### Additional Configuration Options

If you want to limit the formats available in the Format drop-down, add the following to the config definition:

'format_tags': 'p;h3;h4',

### Embedded content

Links in your HTMLFields will be able to point to either a model's list view or a model instance's absolute url. To provide a url for a model, define a class method called absolute_list_url:

@classmethod
def absolute_list_url(cls):
return reverse('career_posting')

To provide a url for a model instance, define a method called get_absolute_url:

@models.permalink
def get_absolute_url(self):
return ('structure_page', None, {
'slug': self.slug
})

By default, links will be able to point to any model from any registered app. You can specify a list to limit the options by providing a `CKEDITOR_EMBED_CONTENT` setting like this:

CKEDITOR_EMBED_CONTENT = ['structure.page', 'services.service', 'services.technology', 'portfolio.portfolioitem']

This will limit the list to four items and hide models that don't have absolute urls like 'auth.group', etc.

### Media URL ### Media URL


You can also customize the URL that django-ckeditor will look for the CKEditor You can also customize the URL that django-ckeditor will look for the CKEditor
Expand Down

0 comments on commit defe4b3

Please sign in to comment.