Merge pull request #196 from Visgean/patch-2
Loading form media section
This commit is contained in:
commit
bb3588312a
11
README.rst
11
README.rst
|
@ -136,7 +136,10 @@ Alernatively you can use the included ``CKEditorWidget`` as the widget for a for
|
|||
admin.site.register(Post, PostAdmin)
|
||||
|
||||
|
||||
Note that when using outside of admin panel you will have to make sure all form media is present for the editor to work. You may have to render the media like so::
|
||||
Outside of django admin
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
When you are rendering form outside of admin panel you will have to make sure that all form media is present for the editor to work. One of the way how to achieve this is following::
|
||||
|
||||
<form>
|
||||
{{ myform.media }}
|
||||
|
@ -144,6 +147,12 @@ Note that when using outside of admin panel you will have to make sure all form
|
|||
<input type="submit"/>
|
||||
</form>
|
||||
|
||||
or you can load the media manually at it is done in demo app::
|
||||
|
||||
{% load staticfiles %}
|
||||
<script type="text/javascript" src="{% static "ckeditor/ckeditor/ckeditor.js" %}"></script>
|
||||
<script type="text/javascript" src="{% static "ckeditor/ckeditor-init.js" %}"></script>
|
||||
|
||||
|
||||
|
||||
Management Commands
|
||||
|
|
Loading…
Reference in New Issue