Skip to content

Commit

Permalink
Fix passing editor options for RTE in template
Browse files Browse the repository at this point in the history
  • Loading branch information
roadsideseb committed Sep 25, 2014
1 parent df0d69f commit e259536
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 10 deletions.
24 changes: 24 additions & 0 deletions docs/source/recipes.rst
Expand Up @@ -124,5 +124,29 @@ for the Fancypages app to ``custom`` and pass you view class as the
.. _`the Marionette views for Fancypages`: https://github.com/tangentlabs/django-fancypages/blob/master/fancypages/static/fancypages/src/js/views.js


Customising Rich Text Editor
----------------------------

In addition to choose the editor you want to use for rich text editing, you can
also configure the way the editor behaves by passing editor-specific options
to the fancypages app when it is initialised in the
``fancypages/editor/body.html`` template. Simply overwrite the template and
update the script section at the bottom with something like this::

.. code-block:: javascript
$(document).ready(function(){
FancypageApp.start({
editor: 'trumbowyg',
editorOptions: {
fullscreenable: true
btns: [
'viewHTML',
'|', 'formatting',
'|', 'link',
'|', 'insertImage',
'|', 'insertHorizontalRule'
]
},
});
});

0 comments on commit e259536

Please sign in to comment.