Commits

Owen Nelson committed fdd9993

fixes #3, fixes #2. Completes all topics needed in the README and updates help text in wmd.

Comments (0)

Files changed (2)

 Prep the static media
 ^^^^^^^^^^^^^^^^^^^^^
 
-media with staticfiles or symlinks
+Using the excellent
+`staticfiles <http://pypi.python.org/pypi/dajngo-staticfiles>`_ app, mdown's
+static files should get picked up automatically.
 
-Template Overrides
-^^^^^^^^^^^^^^^^^^
+If the staticfiles app is not your style, you'll need to locate the install
+location for the ``mdown`` package (usually your python interpreter's
+``site-packages`` directory) and copy/symlink ``mdown/static/mdown`` into your
+project ``site_media`` directory.
 
-While not 100% neccessary, there are some styles in the default theme that
-will interfere with the rendering of the WmdWidget's preview panel when 
-editing content on the site (rather than using the admin interface).
-
-In order to remedy this issue ensure the app directory template loader is 
-activated and ``mdown`` is listed in ``INSTALLED_APPS`` **before** ``mezzanine.core``
-
-.. TODO: does the app order mean you don't have to remove the current theme's template?
-   Testing required.
 
 Configuration
 -------------
 
-With the app installed, you need to make a couple choices.
+First off, add ``mdown`` to your list of ``INSTALLED_APPS`` in your project settings module.
 
-``RICHTEXT_WIDGET_CLASS``
-^^^^^^^^^^^^^^^^^^^^^^^^^
+With the app installed, you need to make a couple choices...
+
+RICHTEXT_WIDGET_CLASS
+^^^^^^^^^^^^^^^^^^^^^
 
 This package provides 2 options for this setting.
 
 
-+ ``"mdown.forms.WmdWidget"`` **(recommended)**  *Activates the WMD rich text editor.*
-+ ``"mdown.forms.PlainWidget"`` *Use a plain Textarea (no rich text editor).*
+``"mdown.forms.WmdWidget"``: **(recommended)**
+    *Activates the WMD rich text editor.*
 
+``"mdown.forms.PlainWidget"``:
+    *Use a plain Textarea (no rich text editor).*
 
-``RICHTEXT_FILTER``
-^^^^^^^^^^^^^^^^^^^
+
+RICHTEXT_FILTER
+^^^^^^^^^^^^^^^
 Again, there are 2 options for this setting.
 
-+ ``"mdown.filters.codehilite"`` *Renders the content using markdown with the 
-  codehilite extension enabled.*
-+ ``"mdown.filters.plain"`` *Renders the content using vanilla markdown formatting.*
+``"mdown.filters.codehilite"``
+    *Renders the content using markdown with the
+    codehilite extension enabled.*
+
+``"mdown.filters.plain"``
+    *Renders the content using vanilla markdown formatting.*
 
 Extra Steps
 -----------
 **Note:** this requires pygments to be installed (use ``pip install pygments``
 or ``easy_install pygments`` to use this feature).
 
-Invoke the command with no args to see a usage message and list of available color schemes on your system.::
+Invoke the command with no args to see a usage message and list of available
+color schemes on your system.::
 
     user@home:~/mysite$ ./manage.py pygments_styles
     Usage: ./manage.py pygments_styles <scheme_name>
 
     user@home:~/mysite$ ./manage.py pygment_styles colorful > site_media/css/pygments.css
 
-Once you've got a css file generated, simply add it to your site's base template to get your code "pretty" printed.
+In additon to this single scheme method, the command also accepts the ``--all``
+flag, which will generate styles for all available, but with one key
+difference: each scheme is prefixed with its name as a css class name. This
+is handy during theme development as you can quickly switch pygments schemes
+just by setting the class on the body tag to your choice of scheme without
+having to regenerate css files constantly.
+
+Once you've got a css file generated, simply add it to your site's base
+template to get your code "pretty" printed.
+
 
 Updating Theme Templates
 ^^^^^^^^^^^^^^^^^^^^^^^^

mdown/static/mdown/wmd/wmd.js

     linkDialogText: 
         "<p style='margin-top: 0px'><b>Enter the web address.</b></p>" + 
         "<p>You can also add a title, which will be displayed as a tool tip.</p>" + 
-        "<p>Example:<br />http://wmd-editor.com/   \"Optional title\"</p>",
+        "<p>Example:<br />http://daringfireball.net/projects/markdown/   \"Optional title\"</p>",
 
     // The default text that appears in the dialog input box when entering
     // links.
     imageDirectory: "images/",
 
     // The link and title for the help button
-    helpLink: "http://wmd-editor.com/",
-    helpHoverTitle: "WMD website",
+    helpLink: "http://daringfireball.net/projects/markdown/basics/",
+    helpHoverTitle: "Markdown Basics Reference",
     helpTarget: "_blank",
 
     // Some intervals in ms.  These can be adjusted to reduce the control's load.