Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This isn't a direct answer to your question, but it might help.</p> <p>It seems to be quite common to add the <a href="http://tinymce.moxiecode.com/" rel="nofollow noreferrer">TinyMCE</a> WYSIWYG editor to django. If you search for instructions on how to add TinyMCE to the Django admin, you might be able to adapt the method for WMD.</p> <p>In the book <a href="http://www.apress.com/book/view/1430219386" rel="nofollow noreferrer">Practical Django Projects, Second Edition</a>, the author embeds TinyMCE in the <code>flatpages</code> admin. You can download the code from a <a href="http://bitbucket.org/ubernostrum/practical-django-projects/src/" rel="nofollow noreferrer">Bitbucket repository</a>, and see how it's done (look at cms/templates/admin/). Alternatively, you could try <a href="http://code.djangoproject.com/wiki/AddWYSIWYGEditor" rel="nofollow noreferrer">this guide</a> on the Django website.</p> <hr> <p>+1 for the question. I would also like to write <code>flatpages</code> in markdown. However I think the best method for using markdown is to </p> <ol> <li>have two fields, say <code>content</code> and <code>content_html</code>, and store the original markdown in <code>content</code>.</li> <li>When the object is saved, convert the markdown to html and store it in <code>content_html</code>.</li> </ol> <p>This means you avoid converting to html in the template every time the page is viewed. However I don't know an elegant way to extend <code>contrib.flatpages</code> by 'adding' an extra field. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload