Issue #64 + slight improvement.

This commit is contained in:
Pouria Hadjibagheri 2017-05-04 11:24:06 +01:00
parent e74785c108
commit c6689c9985
46 changed files with 380 additions and 348 deletions

View file

@ -1,6 +1,80 @@
Customization
=============
----
General (ex. settings)
**********************
Templates
---------
The default widget is as seen `here
<https://github.com/neutronX/django-markdownx/blob/master/markdownx/templates/markdownx/widget.html>`_.
If you would like to customise this; for instance, using `Bootstrap <https://getbootstrap.com>`_ to implement
side-by-side panes (as seen in :doc:`preview animation<index>`), you should override the default template by creating
your own template and saving it under ``markdownx/widget2.html`` (Django 1.11+) or ``markdownx/widget.html`` (Django
1.10 and below) in your project's :guilabel:`TEMPLATE_DIRS`.
Here is an example of the contents:
.. code-block:: html
<div class="markdownx row">
<div class="col-md-6">
{{ markdownx_editor }}
</div>
<div class="col-md-6">
<div class="markdownx-preview"></div>
</div>
</div>
Fields
------
We have ensured that **MarkdownX** is fully extensible and provides a high degree of flexibility in development.
There are times that you may wish to Markdownify a different type of field, or utilize your own customized widget. To
accommodate this, we have provided the tools to apply **MarkdownX** infrastructure to other fields through *Widgets*.
For instance, to apply **MarkdownX** to ``TextField`` instances in your Django Admins, you can override the default
widget in the Admins module in :guilabel:`admin.py` of your Django App as follows:
.. code-block:: python
:linenos:
from django.db import models
from django.contrib import admin
from markdownx.widgets import AdminMarkdownxWidget
from .models import MyModel
class MyModelAdmin(admin.ModelAdmin):
formfield_overrides = {
models.TextField: {'widget': AdminMarkdownxWidget},
}
admin.site.register(MyModel, MyModelAdmin)
Image tags
----------
Markdown uses ``![]()`` tag by default to insert uploaded image file. This generates a simple (X)HTML ``<image>`` tag.
If you wish to have more control and use your own HTML tags, you may create a custom ``form_valid()`` function in
``ImageUploadView`` class, as highlighted `here
<https://github.com/neutronX/django-markdownx/blob/master/markdownx/views.py#L55-L82>`_.
----
Settings
********
You may place any of the variables outlined in this page in your :guilabel:`settings.py`, alter their values and
override default behaviours.
@ -9,6 +83,7 @@ override default behaviours.
customisations, or to be rather more accurate, **event controls** are enabled in the frontend through JavaScript
events. To learn more about these events, see our :doc:`JavaScript documentations on events<js/events>`.
Quick Reference
---------------
@ -55,6 +130,7 @@ Looking for a specific feature? see the sidebar for the table of contents.
Markdownify
...........
Default function that compiles markdown using defined extensions. Using custom function can allow you to
pre-process or post-process markdown text. See below for more info.
@ -244,7 +320,7 @@ by setting the value to ``False`` if so is desired.
.. Important::
MarkdownX does *not* disable CSRF protection by default, and requires the token for all AJAX request.
**MarkdownX** does *not* disable CSRF protection by default, and requires the token for all AJAX request.
Editor

View file

@ -75,71 +75,6 @@ your :guilabel:`app/admin.py` as follows:
admin.site.register(MyModel, MarkdownxModelAdmin)
Advanced
--------
Template customization
......................
The default widget is as seen `here
<https://github.com/neutronX/django-markdownx/blob/master/markdownx/templates/markdownx/widget.html>`_.
If you would like to customise this; for instance, using `Bootstrap <https://getbootstrap.com>`_ to implement
side-by-side panes (as seen in :doc:`preview animation<index>`), you should override the default template by creating
your own template and saving it under ``markdownx/widget.html`` (Django 1.11+) or ``markdownx/widget2.html`` (Django
1.10 and below) in your project's :guilabel:`TEMPLATE_DIRS`.
Here is an example of the contents:
.. code-block:: html
<div class="markdownx row">
<div class="col-md-6">
{{ markdownx_editor }}
</div>
<div class="col-md-6">
<div class="markdownx-preview"></div>
</div>
</div>
Field customization
...................
We have ensured that **MarkdownX** is fully extensible and provides a high degree of flexibility in development.
There are times that you may wish to Markdownify a different type of field, or utilize your own customized widget. To
accommodate this, we have provided the tools to apply **MarkdownX** infrastructure to other fields through *Widgets*.
For instance, to apply **MarkdownX** to ``TextField`` instances in your Django Admins, you can override the default
widget in the Admins module in :guilabel:`admin.py` of your Django App as follows:
.. code-block:: python
:linenos:
from django.db import models
from django.contrib import admin
from markdownx.widgets import AdminMarkdownxWidget
from .models import MyModel
class MyModelAdmin(admin.ModelAdmin):
formfield_overrides = {
models.TextField: {'widget': AdminMarkdownxWidget},
}
admin.site.register(MyModel, MyModelAdmin)
Custom image tags
.................
Markdown uses ``![]()`` tag by default to insert uploaded image file. This generates a simple (X)HTML ``<image>`` tag.
If you wish to have more control and use your own HTML tags, you may create a custom ``form_valid()`` function in
``ImageUploadView`` class, as highlighted `here
<https://github.com/neutronX/django-markdownx/blob/master/markdownx/views.py#L55-L82>`_.
.. _TextField: https://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.TextField

View file

@ -2,5 +2,15 @@
URLs
----
.. automodule:: markdownx.urls
:members:
.. tip::
All **MarkdownX** URLs patterns have unique names that start with ``markdownx_`` and are followed by a specific
name; for instance, the `upload` link has the name :guilabel:`markdownx_upload`. It is still possible to use
the ``namespace`` attribute (see `Django docs`_ to find out more) when including the patterns in your project.
.. _Django docs: https://docs.djangoproject.com/en/dev/topics/http/urls/#url-namespaces

View file

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Overview: module code &mdash; Django Markdownx 2.0.16 documentation</title>
<title>Overview: module code &mdash; Django Markdownx 2.0.19 documentation</title>
@ -35,7 +35,7 @@
<link rel="index" title="Index"
href="../genindex.html"/>
<link rel="search" title="Search" href="../search.html"/>
<link rel="top" title="Django Markdownx 2.0.16 documentation" href="../index.html"/>
<link rel="top" title="Django Markdownx 2.0.19 documentation" href="../index.html"/>
<script src="../_static/js/modernizr.min.js"></script>
@ -202,7 +202,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../',
VERSION:'2.0.16',
VERSION:'2.0.19',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,

View file

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>markdownx.exceptions &mdash; Django Markdownx 2.0.16 documentation</title>
<title>markdownx.exceptions &mdash; Django Markdownx 2.0.19 documentation</title>
@ -35,7 +35,7 @@
<link rel="index" title="Index"
href="../../genindex.html"/>
<link rel="search" title="Search" href="../../search.html"/>
<link rel="top" title="Django Markdownx 2.0.16 documentation" href="../../index.html"/>
<link rel="top" title="Django Markdownx 2.0.19 documentation" href="../../index.html"/>
<link rel="up" title="Module code" href="../index.html"/>
@ -257,7 +257,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../',
VERSION:'2.0.16',
VERSION:'2.0.19',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,

View file

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>markdownx.forms &mdash; Django Markdownx 2.0.16 documentation</title>
<title>markdownx.forms &mdash; Django Markdownx 2.0.19 documentation</title>
@ -35,7 +35,7 @@
<link rel="index" title="Index"
href="../../genindex.html"/>
<link rel="search" title="Search" href="../../search.html"/>
<link rel="top" title="Django Markdownx 2.0.16 documentation" href="../../index.html"/>
<link rel="top" title="Django Markdownx 2.0.19 documentation" href="../../index.html"/>
<link rel="up" title="Module code" href="../index.html"/>
@ -239,6 +239,14 @@
<span class="n">charset</span><span class="o">=</span><span class="kc">None</span>
<span class="p">)</span>
<span class="k">if</span> <span class="p">(</span><span class="n">content_type</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span> <span class="o">==</span> <span class="bp">self</span><span class="o">.</span><span class="n">_SVG_TYPE</span>
<span class="ow">and</span> <span class="n">MARKDOWNX_SVG_JAVASCRIPT_PROTECTION</span>
<span class="ow">and</span> <span class="n">xml_has_javascript</span><span class="p">(</span><span class="n">uploaded_image</span><span class="o">.</span><span class="n">read</span><span class="p">())):</span>
<span class="k">raise</span> <span class="n">MarkdownxImageUploadError</span><span class="p">(</span>
<span class="s1">&#39;Failed security monitoring: SVG file contains JavaScript.&#39;</span>
<span class="p">)</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_save</span><span class="p">(</span><span class="n">uploaded_image</span><span class="p">,</span> <span class="n">file_name</span><span class="p">,</span> <span class="n">commit</span><span class="p">)</span></div>
<span class="k">def</span> <span class="nf">_save</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">image</span><span class="p">,</span> <span class="n">file_name</span><span class="p">,</span> <span class="n">commit</span><span class="p">):</span>
@ -344,14 +352,6 @@
<span class="n">expected</span><span class="o">=</span><span class="n">MARKDOWNX_UPLOAD_MAX_SIZE</span>
<span class="p">)</span>
<span class="k">elif</span> <span class="p">(</span><span class="n">content_type</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span> <span class="o">!=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_SVG_TYPE</span>
<span class="ow">and</span> <span class="n">MARKDOWNX_SVG_JAVASCRIPT_PROTECTION</span>
<span class="ow">and</span> <span class="n">xml_has_javascript</span><span class="p">(</span><span class="n">upload</span><span class="o">.</span><span class="n">read</span><span class="p">())):</span>
<span class="k">raise</span> <span class="n">MarkdownxImageUploadError</span><span class="p">(</span>
<span class="s1">&#39;Failed security monitoring: SVG file contains JavaScript.&#39;</span>
<span class="p">)</span>
<span class="k">return</span> <span class="n">upload</span></div></div>
</pre></div>
@ -389,7 +389,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../',
VERSION:'2.0.16',
VERSION:'2.0.19',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,

View file

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>markdownx.utils &mdash; Django Markdownx 2.0.16 documentation</title>
<title>markdownx.utils &mdash; Django Markdownx 2.0.19 documentation</title>
@ -35,7 +35,7 @@
<link rel="index" title="Index"
href="../../genindex.html"/>
<link rel="search" title="Search" href="../../search.html"/>
<link rel="top" title="Django Markdownx 2.0.16 documentation" href="../../index.html"/>
<link rel="top" title="Django Markdownx 2.0.19 documentation" href="../../index.html"/>
<link rel="up" title="Module code" href="../index.html"/>
@ -175,7 +175,7 @@
<div class="viewcode-block" id="markdownify"><a class="viewcode-back" href="../../markdownx/docs/utilities.html#markdownx.utils.markdownify">[docs]</a><span class="k">def</span> <span class="nf">markdownify</span><span class="p">(</span><span class="n">content</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Trans-compiles Markdown text to HTML.</span>
<span class="sd"> </span>
<span class="sd"> :param content: Markdown text.</span>
<span class="sd"> :type content: str</span>
<span class="sd"> :return: HTML encoded text.</span>
@ -192,7 +192,7 @@
<span class="k">def</span> <span class="nf">_crop</span><span class="p">(</span><span class="n">im</span><span class="p">,</span> <span class="n">target_x</span><span class="p">,</span> <span class="n">target_y</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Crops the image to the given specifications.</span>
<span class="sd"> </span>
<span class="sd"> :param im: Instance of the image.</span>
<span class="sd"> :type im: PIL Image</span>
<span class="sd"> :param target_x: New x-axis.</span>
@ -225,8 +225,8 @@
<span class="k">def</span> <span class="nf">_scale</span><span class="p">(</span><span class="n">im</span><span class="p">,</span> <span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Scales the image to the given specifications. </span>
<span class="sd"> </span>
<span class="sd"> Scales the image to the given specifications.</span>
<span class="sd"> :param im: Instance of the image.</span>
<span class="sd"> :type im: PIL Image</span>
<span class="sd"> :param x: x-axis size.</span>
@ -236,7 +236,7 @@
<span class="sd"> :return: Scaled image, re-sampled with anti-aliasing filter.</span>
<span class="sd"> :rtype: Image</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">im</span><span class="o">.</span><span class="n">resize</span><span class="p">(</span>
<span class="n">im</span> <span class="o">=</span> <span class="n">im</span><span class="o">.</span><span class="n">resize</span><span class="p">(</span>
<span class="p">(</span><span class="nb">int</span><span class="p">(</span><span class="n">x</span><span class="p">),</span> <span class="nb">int</span><span class="p">(</span><span class="n">y</span><span class="p">)),</span>
<span class="n">resample</span><span class="o">=</span><span class="n">Image</span><span class="o">.</span><span class="n">ANTIALIAS</span>
<span class="p">)</span>
@ -245,7 +245,7 @@
<div class="viewcode-block" id="scale_and_crop"><a class="viewcode-back" href="../../markdownx/docs/utilities.html#markdownx.utils.scale_and_crop">[docs]</a><span class="k">def</span> <span class="nf">scale_and_crop</span><span class="p">(</span><span class="n">image</span><span class="p">,</span> <span class="n">size</span><span class="p">,</span> <span class="n">crop</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">upscale</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">quality</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Modifies raster graphic images to the specifications. </span>
<span class="sd"> Modifies raster graphic images to the specifications.</span>
<span class="sd"> :param image: Raster graphic image.</span>
<span class="sd"> :type image: BytesIO</span>
@ -255,7 +255,7 @@
<span class="sd"> :type crop: bool</span>
<span class="sd"> :param upscale: Whether or not to upscale the image.</span>
<span class="sd"> :type upscale: bool</span>
<span class="sd"> :param quality: Quality of the new image in DPI. </span>
<span class="sd"> :param quality: Quality of the new image in DPI.</span>
<span class="sd"> :type quality: int</span>
<span class="sd"> :return: Raster graphic image modified to the given specifications.</span>
<span class="sd"> :rtype: BytesIO</span>
@ -300,16 +300,18 @@
<div class="viewcode-block" id="xml_has_javascript"><a class="viewcode-back" href="../../markdownx/docs/utilities.html#markdownx.utils.xml_has_javascript">[docs]</a><span class="k">def</span> <span class="nf">xml_has_javascript</span><span class="p">(</span><span class="n">data</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Checks XML for JavaScript. See &quot;security&quot; in :doc:`customization &lt;../../customization&gt;` for </span>
<span class="sd"> Checks XML for JavaScript. See &quot;security&quot; in :doc:`customization &lt;../../customization&gt;` for</span>
<span class="sd"> additional information.</span>
<span class="sd"> </span>
<span class="sd"> :param data: Contents to be monitored for JavaScript injection.</span>
<span class="sd"> :type data: str</span>
<span class="sd"> :type data: str, bytes</span>
<span class="sd"> :return: ``True`` if **data** contains JavaScript tag(s), otherwise ``False``.</span>
<span class="sd"> :rtype: bool</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="kn">from</span> <span class="nn">re</span> <span class="k">import</span> <span class="n">search</span><span class="p">,</span> <span class="n">IGNORECASE</span><span class="p">,</span> <span class="n">MULTILINE</span>
<span class="n">data</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="n">data</span><span class="p">,</span> <span class="n">encoding</span><span class="o">=</span><span class="s1">&#39;UTF-8&#39;</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="n">data</span><span class="p">)</span>
<span class="c1"># ------------------------------------------------</span>
<span class="c1"># Handles JavaScript nodes and stringified nodes.</span>
<span class="c1"># ------------------------------------------------</span>
@ -379,7 +381,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../',
VERSION:'2.0.16',
VERSION:'2.0.19',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,

View file

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>markdownx.views &mdash; Django Markdownx 2.0.16 documentation</title>
<title>markdownx.views &mdash; Django Markdownx 2.0.19 documentation</title>
@ -35,7 +35,7 @@
<link rel="index" title="Index"
href="../../genindex.html"/>
<link rel="search" title="Search" href="../../search.html"/>
<link rel="top" title="Django Markdownx 2.0.16 documentation" href="../../index.html"/>
<link rel="top" title="Django Markdownx 2.0.19 documentation" href="../../index.html"/>
<link rel="up" title="Module code" href="../index.html"/>
@ -280,7 +280,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../',
VERSION:'2.0.16',
VERSION:'2.0.19',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,

View file

@ -1,6 +1,80 @@
Customization
=============
----
General (ex. settings)
**********************
Templates
---------
The default widget is as seen `here
<https://github.com/neutronX/django-markdownx/blob/master/markdownx/templates/markdownx/widget.html>`_.
If you would like to customise this; for instance, using `Bootstrap <https://getbootstrap.com>`_ to implement
side-by-side panes (as seen in :doc:`preview animation<index>`), you should override the default template by creating
your own template and saving it under ``markdownx/widget2.html`` (Django 1.11+) or ``markdownx/widget.html`` (Django
1.10 and below) in your project's :guilabel:`TEMPLATE_DIRS`.
Here is an example of the contents:
.. code-block:: html
<div class="markdownx row">
<div class="col-md-6">
{{ markdownx_editor }}
</div>
<div class="col-md-6">
<div class="markdownx-preview"></div>
</div>
</div>
Fields
------
We have ensured that **MarkdownX** is fully extensible and provides a high degree of flexibility in development.
There are times that you may wish to Markdownify a different type of field, or utilize your own customized widget. To
accommodate this, we have provided the tools to apply **MarkdownX** infrastructure to other fields through *Widgets*.
For instance, to apply **MarkdownX** to ``TextField`` instances in your Django Admins, you can override the default
widget in the Admins module in :guilabel:`admin.py` of your Django App as follows:
.. code-block:: python
:linenos:
from django.db import models
from django.contrib import admin
from markdownx.widgets import AdminMarkdownxWidget
from .models import MyModel
class MyModelAdmin(admin.ModelAdmin):
formfield_overrides = {
models.TextField: {'widget': AdminMarkdownxWidget},
}
admin.site.register(MyModel, MyModelAdmin)
Image tags
----------
Markdown uses ``![]()`` tag by default to insert uploaded image file. This generates a simple (X)HTML ``<image>`` tag.
If you wish to have more control and use your own HTML tags, you may create a custom ``form_valid()`` function in
``ImageUploadView`` class, as highlighted `here
<https://github.com/neutronX/django-markdownx/blob/master/markdownx/views.py#L55-L82>`_.
----
Settings
********
You may place any of the variables outlined in this page in your :guilabel:`settings.py`, alter their values and
override default behaviours.
@ -9,6 +83,7 @@ override default behaviours.
customisations, or to be rather more accurate, **event controls** are enabled in the frontend through JavaScript
events. To learn more about these events, see our :doc:`JavaScript documentations on events<js/events>`.
Quick Reference
---------------
@ -55,6 +130,7 @@ Looking for a specific feature? see the sidebar for the table of contents.
Markdownify
...........
Default function that compiles markdown using defined extensions. Using custom function can allow you to
pre-process or post-process markdown text. See below for more info.
@ -244,7 +320,7 @@ by setting the value to ``False`` if so is desired.
.. Important::
MarkdownX does *not* disable CSRF protection by default, and requires the token for all AJAX request.
**MarkdownX** does *not* disable CSRF protection by default, and requires the token for all AJAX request.
Editor

View file

@ -75,71 +75,6 @@ your :guilabel:`app/admin.py` as follows:
admin.site.register(MyModel, MarkdownxModelAdmin)
Advanced
--------
Template customization
......................
The default widget is as seen `here
<https://github.com/neutronX/django-markdownx/blob/master/markdownx/templates/markdownx/widget.html>`_.
If you would like to customise this; for instance, using `Bootstrap <https://getbootstrap.com>`_ to implement
side-by-side panes (as seen in :doc:`preview animation<index>`), you should override the default template by creating
your own template and saving it under ``markdownx/widget.html`` (Django 1.11+) or ``markdownx/widget2.html`` (Django
1.10 and below) in your project's :guilabel:`TEMPLATE_DIRS`.
Here is an example of the contents:
.. code-block:: html
<div class="markdownx row">
<div class="col-md-6">
{{ markdownx_editor }}
</div>
<div class="col-md-6">
<div class="markdownx-preview"></div>
</div>
</div>
Field customization
...................
We have ensured that **MarkdownX** is fully extensible and provides a high degree of flexibility in development.
There are times that you may wish to Markdownify a different type of field, or utilize your own customized widget. To
accommodate this, we have provided the tools to apply **MarkdownX** infrastructure to other fields through *Widgets*.
For instance, to apply **MarkdownX** to ``TextField`` instances in your Django Admins, you can override the default
widget in the Admins module in :guilabel:`admin.py` of your Django App as follows:
.. code-block:: python
:linenos:
from django.db import models
from django.contrib import admin
from markdownx.widgets import AdminMarkdownxWidget
from .models import MyModel
class MyModelAdmin(admin.ModelAdmin):
formfield_overrides = {
models.TextField: {'widget': AdminMarkdownxWidget},
}
admin.site.register(MyModel, MyModelAdmin)
Custom image tags
.................
Markdown uses ``![]()`` tag by default to insert uploaded image file. This generates a simple (X)HTML ``<image>`` tag.
If you wish to have more control and use your own HTML tags, you may create a custom ``form_valid()`` function in
``ImageUploadView`` class, as highlighted `here
<https://github.com/neutronX/django-markdownx/blob/master/markdownx/views.py#L55-L82>`_.
.. _TextField: https://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.TextField

View file

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Contributions &mdash; Django Markdownx 2.0.16 documentation</title>
<title>Contributions &mdash; Django Markdownx 2.0.19 documentation</title>
@ -35,7 +35,7 @@
<link rel="index" title="Index"
href="genindex.html"/>
<link rel="search" title="Search" href="search.html"/>
<link rel="top" title="Django Markdownx 2.0.16 documentation" href="index.html"/>
<link rel="top" title="Django Markdownx 2.0.19 documentation" href="index.html"/>
<link rel="next" title="License" href="license.html"/>
<link rel="prev" title="Views" href="markdownx/docs/views.html"/>
@ -413,7 +413,7 @@ whether to save the changes or discard them and hold onto the default.</p>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'2.0.16',
VERSION:'2.0.19',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,

View file

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Customization &mdash; Django Markdownx 2.0.16 documentation</title>
<title>Customization &mdash; Django Markdownx 2.0.19 documentation</title>
@ -35,7 +35,7 @@
<link rel="index" title="Index"
href="genindex.html"/>
<link rel="search" title="Search" href="search.html"/>
<link rel="top" title="Django Markdownx 2.0.16 documentation" href="index.html"/>
<link rel="top" title="Django Markdownx 2.0.19 documentation" href="index.html"/>
<link rel="next" title="Translation" href="translation.html"/>
<link rel="prev" title="Example" href="example.html"/>
@ -94,25 +94,25 @@
<li class="toctree-l1"><a class="reference internal" href="getting_started.html">Getting Started</a></li>
<li class="toctree-l1"><a class="reference internal" href="example.html">Example</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Customization</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#quick-reference">Quick Reference</a></li>
<li class="toctree-l2"><a class="reference internal" href="#details-and-examples">Details and examples</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#markdownify">Markdownify</a></li>
<li class="toctree-l3"><a class="reference internal" href="#markdown-extensions">Markdown Extensions</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#extensions">Extensions</a></li>
<li class="toctree-l4"><a class="reference internal" href="#extension-configurations">Extension configurations</a></li>
<li class="toctree-l2"><a class="reference internal" href="#general-ex-settings">General (ex. settings)</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#templates">Templates</a></li>
<li class="toctree-l3"><a class="reference internal" href="#fields">Fields</a></li>
<li class="toctree-l3"><a class="reference internal" href="#image-tags">Image tags</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#markdown-urls">Markdown URLs</a></li>
<li class="toctree-l3"><a class="reference internal" href="#media-path">Media Path</a></li>
<li class="toctree-l3"><a class="reference internal" href="#image-uploads">Image Uploads</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#maximum-size">Maximum size</a></li>
<li class="toctree-l4"><a class="reference internal" href="#formats">Formats</a></li>
<li class="toctree-l4"><a class="reference internal" href="#dimension-and-quality">Dimension and Quality</a></li>
<li class="toctree-l2"><a class="reference internal" href="#settings">Settings</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#quick-reference">Quick Reference</a></li>
<li class="toctree-l3"><a class="reference internal" href="#details-and-examples">Details and examples</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#markdownify">Markdownify</a></li>
<li class="toctree-l4"><a class="reference internal" href="#markdown-extensions">Markdown Extensions</a></li>
<li class="toctree-l4"><a class="reference internal" href="#markdown-urls">Markdown URLs</a></li>
<li class="toctree-l4"><a class="reference internal" href="#media-path">Media Path</a></li>
<li class="toctree-l4"><a class="reference internal" href="#image-uploads">Image Uploads</a></li>
<li class="toctree-l4"><a class="reference internal" href="#security">Security</a></li>
<li class="toctree-l4"><a class="reference internal" href="#editor">Editor</a></li>
<li class="toctree-l4"><a class="reference internal" href="#latency">Latency</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#security">Security</a></li>
<li class="toctree-l3"><a class="reference internal" href="#editor">Editor</a></li>
<li class="toctree-l3"><a class="reference internal" href="#latency">Latency</a></li>
</ul>
</li>
</ul>
@ -187,6 +187,77 @@
<div class="section" id="customization">
<h1>Customization<a class="headerlink" href="#customization" title="Permalink to this headline"></a></h1>
<hr class="docutils" />
<div class="section" id="general-ex-settings">
<h2>General (ex. settings)<a class="headerlink" href="#general-ex-settings" title="Permalink to this headline"></a></h2>
<div class="section" id="templates">
<h3>Templates<a class="headerlink" href="#templates" title="Permalink to this headline"></a></h3>
<p>The default widget is as seen <a class="reference external" href="https://github.com/neutronX/django-markdownx/blob/master/markdownx/templates/markdownx/widget.html">here</a>.</p>
<p>If you would like to customise this; for instance, using <a class="reference external" href="https://getbootstrap.com">Bootstrap</a> to implement
side-by-side panes (as seen in <a class="reference internal" href="index.html"><span class="doc">preview animation</span></a>), you should override the default template by creating
your own template and saving it under <code class="docutils literal"><span class="pre">markdownx/widget2.html</span></code> (Django 1.11+) or <code class="docutils literal"><span class="pre">markdownx/widget.html</span></code> (Django
1.10 and below) in your project&#8217;s <span class="guilabel">TEMPLATE_DIRS</span>.</p>
<p>Here is an example of the contents:</p>
<div class="highlight-html"><div class="highlight"><pre><span></span><span class="p">&lt;</span><span class="nt">div</span> <span class="na">class</span><span class="o">=</span><span class="s">&quot;markdownx row&quot;</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">div</span> <span class="na">class</span><span class="o">=</span><span class="s">&quot;col-md-6&quot;</span><span class="p">&gt;</span>
{{ markdownx_editor }}
<span class="p">&lt;/</span><span class="nt">div</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">div</span> <span class="na">class</span><span class="o">=</span><span class="s">&quot;col-md-6&quot;</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">div</span> <span class="na">class</span><span class="o">=</span><span class="s">&quot;markdownx-preview&quot;</span><span class="p">&gt;&lt;/</span><span class="nt">div</span><span class="p">&gt;</span>
<span class="p">&lt;/</span><span class="nt">div</span><span class="p">&gt;</span>
<span class="p">&lt;/</span><span class="nt">div</span><span class="p">&gt;</span>
</pre></div>
</div>
</div>
<div class="section" id="fields">
<h3>Fields<a class="headerlink" href="#fields" title="Permalink to this headline"></a></h3>
<p>We have ensured that <strong>MarkdownX</strong> is fully extensible and provides a high degree of flexibility in development.</p>
<p>There are times that you may wish to Markdownify a different type of field, or utilize your own customized widget. To
accommodate this, we have provided the tools to apply <strong>MarkdownX</strong> infrastructure to other fields through <em>Widgets</em>.</p>
<p>For instance, to apply <strong>MarkdownX</strong> to <code class="docutils literal"><span class="pre">TextField</span></code> instances in your Django Admins, you can override the default
widget in the Admins module in <span class="guilabel">admin.py</span> of your Django App as follows:</p>
<div class="highlight-python"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">django.db</span> <span class="kn">import</span> <span class="n">models</span>
<span class="kn">from</span> <span class="nn">django.contrib</span> <span class="kn">import</span> <span class="n">admin</span>
<span class="kn">from</span> <span class="nn">markdownx.widgets</span> <span class="kn">import</span> <span class="n">AdminMarkdownxWidget</span>
<span class="kn">from</span> <span class="nn">.models</span> <span class="kn">import</span> <span class="n">MyModel</span>
<span class="k">class</span> <span class="nc">MyModelAdmin</span><span class="p">(</span><span class="n">admin</span><span class="o">.</span><span class="n">ModelAdmin</span><span class="p">):</span>
<span class="n">formfield_overrides</span> <span class="o">=</span> <span class="p">{</span>
<span class="n">models</span><span class="o">.</span><span class="n">TextField</span><span class="p">:</span> <span class="p">{</span><span class="s1">&#39;widget&#39;</span><span class="p">:</span> <span class="n">AdminMarkdownxWidget</span><span class="p">},</span>
<span class="p">}</span>
<span class="n">admin</span><span class="o">.</span><span class="n">site</span><span class="o">.</span><span class="n">register</span><span class="p">(</span><span class="n">MyModel</span><span class="p">,</span> <span class="n">MyModelAdmin</span><span class="p">)</span>
</pre></div>
</td></tr></table></div>
</div>
<div class="section" id="image-tags">
<h3>Image tags<a class="headerlink" href="#image-tags" title="Permalink to this headline"></a></h3>
<p>Markdown uses <code class="docutils literal"><span class="pre">![]()</span></code> tag by default to insert uploaded image file. This generates a simple (X)HTML <code class="docutils literal"><span class="pre">&lt;image&gt;</span></code> tag.
If you wish to have more control and use your own HTML tags, you may create a custom <code class="docutils literal"><span class="pre">form_valid()</span></code> function in
<code class="docutils literal"><span class="pre">ImageUploadView</span></code> class, as highlighted <a class="reference external" href="https://github.com/neutronX/django-markdownx/blob/master/markdownx/views.py#L55-L82">here</a>.</p>
</div>
</div>
<hr class="docutils" />
<div class="section" id="settings">
<h2>Settings<a class="headerlink" href="#settings" title="Permalink to this headline"></a></h2>
<p>You may place any of the variables outlined in this page in your <span class="guilabel">settings.py</span>, alter their values and
override default behaviours.</p>
<div class="admonition attention">
@ -196,7 +267,7 @@ customisations, or to be rather more accurate, <strong>event controls</strong> a
events. To learn more about these events, see our <a class="reference internal" href="js/events.html"><span class="doc">JavaScript documentations on events</span></a>.</p>
</div>
<div class="section" id="quick-reference">
<h2>Quick Reference<a class="headerlink" href="#quick-reference" title="Permalink to this headline"></a></h2>
<h3>Quick Reference<a class="headerlink" href="#quick-reference" title="Permalink to this headline"></a></h3>
<table border="1" class="docutils">
<colgroup>
<col width="26%" />
@ -270,10 +341,10 @@ Minimum allowed: 500 milliseconds.</td>
</table>
</div>
<div class="section" id="details-and-examples">
<h2>Details and examples<a class="headerlink" href="#details-and-examples" title="Permalink to this headline"></a></h2>
<h3>Details and examples<a class="headerlink" href="#details-and-examples" title="Permalink to this headline"></a></h3>
<p>Looking for a specific feature? see the sidebar for the table of contents.</p>
<div class="section" id="markdownify">
<h3>Markdownify<a class="headerlink" href="#markdownify" title="Permalink to this headline"></a></h3>
<h4>Markdownify<a class="headerlink" href="#markdownify" title="Permalink to this headline"></a></h4>
<p>Default function that compiles markdown using defined extensions. Using custom function can allow you to
pre-process or post-process markdown text. See below for more info.</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">MARKDOWNX_MARKDOWNIFY_FUNCTION</span> <span class="o">=</span> <span class="s1">&#39;markdownx.utils.markdownify&#39;</span>
@ -309,7 +380,7 @@ like this:</p>
</div>
</div>
<div class="section" id="markdown-extensions">
<h3>Markdown Extensions<a class="headerlink" href="#markdown-extensions" title="Permalink to this headline"></a></h3>
<h4>Markdown Extensions<a class="headerlink" href="#markdown-extensions" title="Permalink to this headline"></a></h4>
<p>If you wish to extend Markdown functionalities using extensions, you can do so by altering the variables described in
this section. We recommend you read the documentations for the <a class="reference external" href="https://pythonhosted.org/Markdown/">Markdown package</a>, our default Markdown trans-compiler.</p>
<div class="admonition attention">
@ -317,7 +388,7 @@ this section. We recommend you read the documentations for the <a class="referen
<p class="last">No Markdown extension is enabled by default.</p>
</div>
<div class="section" id="extensions">
<h4>Extensions<a class="headerlink" href="#extensions" title="Permalink to this headline"></a></h4>
<h5>Extensions<a class="headerlink" href="#extensions" title="Permalink to this headline"></a></h5>
<p>List of Markdown extensions that you would like to use. See below for additional information.
See <a class="reference external" href="https://pythonhosted.org/Markdown/extensions/index.html#officially-supported-extensions">available extensions</a> in Markdown docs. For instance, the extension <a class="reference external" href="https://pythonhosted.org/Markdown/extensions/extra.html">extra</a> enables features such as
abbreviations, footnotes, tables and so on.</p>
@ -328,7 +399,7 @@ abbreviations, footnotes, tables and so on.</p>
</div>
</div>
<div class="section" id="extension-configurations">
<h4>Extension configurations<a class="headerlink" href="#extension-configurations" title="Permalink to this headline"></a></h4>
<h5>Extension configurations<a class="headerlink" href="#extension-configurations" title="Permalink to this headline"></a></h5>
<p>Configuration object for used markdown extensions. See <code class="docutils literal"><span class="pre">extension_configs</span></code> in <a class="reference external" href="https://pythonhosted.org/Markdown/reference.html#markdown">Markdown docs</a>. Here is an example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">MARKDOWNX_MARKDOWN_EXTENSION_CONFIGS</span> <span class="o">=</span> <span class="p">{</span>
<span class="s1">&#39;extension_name_1&#39;</span><span class="p">:</span> <span class="p">{</span>
@ -340,7 +411,7 @@ abbreviations, footnotes, tables and so on.</p>
</div>
</div>
<div class="section" id="markdown-urls">
<h3>Markdown URLs<a class="headerlink" href="#markdown-urls" title="Permalink to this headline"></a></h3>
<h4>Markdown URLs<a class="headerlink" href="#markdown-urls" title="Permalink to this headline"></a></h4>
<p>Relative URL to which the Markdown text is sent to be encoded as HTML.</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">MARKDOWNX_URLS_PATH</span> <span class="o">=</span> <span class="s1">&#39;/markdownx/markdownify/&#39;</span>
</pre></div>
@ -352,7 +423,7 @@ markdown formatted markup containing the relative URL for the image.</p>
</div>
</div>
<div class="section" id="media-path">
<h3>Media Path<a class="headerlink" href="#media-path" title="Permalink to this headline"></a></h3>
<h4>Media Path<a class="headerlink" href="#media-path" title="Permalink to this headline"></a></h4>
<p>The path where the images will be stored in your <span class="guilabel">MEDIA_ROOT</span> directory.</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">MARKDOWNX_MEDIA_PATH</span> <span class="o">=</span> <span class="s1">&#39;markdownx/&#39;</span>
</pre></div>
@ -374,9 +445,9 @@ under <code class="docutils literal"><span class="pre">media/markdownx/2017/4/15
</div>
</div>
<div class="section" id="image-uploads">
<h3>Image Uploads<a class="headerlink" href="#image-uploads" title="Permalink to this headline"></a></h3>
<h4>Image Uploads<a class="headerlink" href="#image-uploads" title="Permalink to this headline"></a></h4>
<div class="section" id="maximum-size">
<h4>Maximum size<a class="headerlink" href="#maximum-size" title="Permalink to this headline"></a></h4>
<h5>Maximum size<a class="headerlink" href="#maximum-size" title="Permalink to this headline"></a></h5>
<p>Maximum image size allowed in bytes: Default is 50MB, which is equal to 52,428,800 bytes.</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">MARKDOWNX_UPLOAD_MAX_SIZE</span> <span class="o">=</span> <span class="mi">50</span> <span class="o">*</span> <span class="mi">1024</span> <span class="o">*</span> <span class="mi">1024</span>
</pre></div>
@ -389,7 +460,7 @@ Fellow programmers will thank you for this in the future!</p>
</div>
</div>
<div class="section" id="formats">
<h4>Formats<a class="headerlink" href="#formats" title="Permalink to this headline"></a></h4>
<h5>Formats<a class="headerlink" href="#formats" title="Permalink to this headline"></a></h5>
<p>Image formats that the user is permitted to upload.</p>
<p>Options are:</p>
<table class="docutils field-list" frame="void" rules="none">
@ -409,7 +480,7 @@ Fellow programmers will thank you for this in the future!</p>
</div>
</div>
<div class="section" id="dimension-and-quality">
<h4>Dimension and Quality<a class="headerlink" href="#dimension-and-quality" title="Permalink to this headline"></a></h4>
<h5>Dimension and Quality<a class="headerlink" href="#dimension-and-quality" title="Permalink to this headline"></a></h5>
<p>Different options describing final image processing; e.g. dimension and quality.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
@ -441,7 +512,7 @@ dimensions.</td>
</div>
</div>
<div class="section" id="security">
<h3>Security<a class="headerlink" href="#security" title="Permalink to this headline"></a></h3>
<h4>Security<a class="headerlink" href="#security" title="Permalink to this headline"></a></h4>
<p>SVG graphics are in essence XML files formatted in a specific way; which means that they can contain JavaScript codes.
This introduces a potential front-end security vulnerability for prospective users who will see the SVG image in
context; e.g. it may be employed to collect the user&#8217;s IP address or other personal information.</p>
@ -461,18 +532,18 @@ by setting the value to <code class="docutils literal"><span class="pre">False</
</div>
<div class="admonition important">
<p class="first admonition-title">Important</p>
<p class="last">MarkdownX does <em>not</em> disable CSRF protection by default, and requires the token for all AJAX request.</p>
<p class="last"><strong>MarkdownX</strong> does <em>not</em> disable CSRF protection by default, and requires the token for all AJAX request.</p>
</div>
</div>
<div class="section" id="editor">
<h3>Editor<a class="headerlink" href="#editor" title="Permalink to this headline"></a></h3>
<h4>Editor<a class="headerlink" href="#editor" title="Permalink to this headline"></a></h4>
<p>Change the editor&#8217;s height to match the height of the inner contents whilst typing:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">MARKDOWNX_EDITOR_RESIZABLE</span> <span class="o">=</span> <span class="bp">True</span>
</pre></div>
</div>
</div>
<div class="section" id="latency">
<h3>Latency<a class="headerlink" href="#latency" title="Permalink to this headline"></a></h3>
<h4>Latency<a class="headerlink" href="#latency" title="Permalink to this headline"></a></h4>
<p><strong>Advanced</strong>: When the value of a <strong>MarkdownX</strong> editor is changed, a call is made to the server to trans-compile
Markdown into HTML. However, a minimum latency of <strong>500 milliseconds</strong> has been imposed between the calls. This is to
prevent the bombardment of the server with a huge number of HTTP requests (you don&#8217;t want to DDoS your own server).
@ -488,6 +559,7 @@ the number of CPUs, the amount memory, and how much you are willing to compromis
</div>
</div>
</div>
</div>
</div>
@ -534,7 +606,7 @@ the number of CPUs, the amount memory, and how much you are willing to compromis
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'2.0.16',
VERSION:'2.0.19',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Example &mdash; Django Markdownx 2.0.16 documentation</title>
<title>Example &mdash; Django Markdownx 2.0.19 documentation</title>
@ -35,7 +35,7 @@
<link rel="index" title="Index"
href="genindex.html"/>
<link rel="search" title="Search" href="search.html"/>
<link rel="top" title="Django Markdownx 2.0.16 documentation" href="index.html"/>
<link rel="top" title="Django Markdownx 2.0.19 documentation" href="index.html"/>
<link rel="next" title="Customization" href="customization.html"/>
<link rel="prev" title="Getting Started" href="getting_started.html"/>
@ -96,12 +96,6 @@
<li class="toctree-l2"><a class="reference internal" href="#model">Model</a></li>
<li class="toctree-l2"><a class="reference internal" href="#form">Form</a></li>
<li class="toctree-l2"><a class="reference internal" href="#django-admin">Django Admin</a></li>
<li class="toctree-l2"><a class="reference internal" href="#advanced">Advanced</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#template-customization">Template customization</a></li>
<li class="toctree-l3"><a class="reference internal" href="#field-customization">Field customization</a></li>
<li class="toctree-l3"><a class="reference internal" href="#custom-image-tags">Custom image tags</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="customization.html">Customization</a></li>
@ -246,73 +240,6 @@ your <span class="guilabel">app/admin.py</span> as follows:</p>
</pre></div>
</td></tr></table></div>
</div>
<div class="section" id="advanced">
<h2>Advanced<a class="headerlink" href="#advanced" title="Permalink to this headline"></a></h2>
<div class="section" id="template-customization">
<h3>Template customization<a class="headerlink" href="#template-customization" title="Permalink to this headline"></a></h3>
<p>The default widget is as seen <a class="reference external" href="https://github.com/neutronX/django-markdownx/blob/master/markdownx/templates/markdownx/widget.html">here</a>.</p>
<p>If you would like to customise this; for instance, using <a class="reference external" href="https://getbootstrap.com">Bootstrap</a> to implement
side-by-side panes (as seen in <a class="reference internal" href="index.html"><span class="doc">preview animation</span></a>), you should override the default template by creating
your own template and saving it under <code class="docutils literal"><span class="pre">markdownx/widget.html</span></code> (Django 1.11+) or <code class="docutils literal"><span class="pre">markdownx/widget2.html</span></code> (Django
1.10 and below) in your project&#8217;s <span class="guilabel">TEMPLATE_DIRS</span>.</p>
<p>Here is an example of the contents:</p>
<div class="highlight-html"><div class="highlight"><pre><span></span><span class="p">&lt;</span><span class="nt">div</span> <span class="na">class</span><span class="o">=</span><span class="s">&quot;markdownx row&quot;</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">div</span> <span class="na">class</span><span class="o">=</span><span class="s">&quot;col-md-6&quot;</span><span class="p">&gt;</span>
{{ markdownx_editor }}
<span class="p">&lt;/</span><span class="nt">div</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">div</span> <span class="na">class</span><span class="o">=</span><span class="s">&quot;col-md-6&quot;</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">div</span> <span class="na">class</span><span class="o">=</span><span class="s">&quot;markdownx-preview&quot;</span><span class="p">&gt;&lt;/</span><span class="nt">div</span><span class="p">&gt;</span>
<span class="p">&lt;/</span><span class="nt">div</span><span class="p">&gt;</span>
<span class="p">&lt;/</span><span class="nt">div</span><span class="p">&gt;</span>
</pre></div>
</div>
</div>
<div class="section" id="field-customization">
<h3>Field customization<a class="headerlink" href="#field-customization" title="Permalink to this headline"></a></h3>
<p>We have ensured that <strong>MarkdownX</strong> is fully extensible and provides a high degree of flexibility in development.</p>
<p>There are times that you may wish to Markdownify a different type of field, or utilize your own customized widget. To
accommodate this, we have provided the tools to apply <strong>MarkdownX</strong> infrastructure to other fields through <em>Widgets</em>.</p>
<p>For instance, to apply <strong>MarkdownX</strong> to <code class="docutils literal"><span class="pre">TextField</span></code> instances in your Django Admins, you can override the default
widget in the Admins module in <span class="guilabel">admin.py</span> of your Django App as follows:</p>
<div class="highlight-python"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">django.db</span> <span class="kn">import</span> <span class="n">models</span>
<span class="kn">from</span> <span class="nn">django.contrib</span> <span class="kn">import</span> <span class="n">admin</span>
<span class="kn">from</span> <span class="nn">markdownx.widgets</span> <span class="kn">import</span> <span class="n">AdminMarkdownxWidget</span>
<span class="kn">from</span> <span class="nn">.models</span> <span class="kn">import</span> <span class="n">MyModel</span>
<span class="k">class</span> <span class="nc">MyModelAdmin</span><span class="p">(</span><span class="n">admin</span><span class="o">.</span><span class="n">ModelAdmin</span><span class="p">):</span>
<span class="n">formfield_overrides</span> <span class="o">=</span> <span class="p">{</span>
<span class="n">models</span><span class="o">.</span><span class="n">TextField</span><span class="p">:</span> <span class="p">{</span><span class="s1">&#39;widget&#39;</span><span class="p">:</span> <span class="n">AdminMarkdownxWidget</span><span class="p">},</span>
<span class="p">}</span>
<span class="n">admin</span><span class="o">.</span><span class="n">site</span><span class="o">.</span><span class="n">register</span><span class="p">(</span><span class="n">MyModel</span><span class="p">,</span> <span class="n">MyModelAdmin</span><span class="p">)</span>
</pre></div>
</td></tr></table></div>
</div>
<div class="section" id="custom-image-tags">
<h3>Custom image tags<a class="headerlink" href="#custom-image-tags" title="Permalink to this headline"></a></h3>
<p>Markdown uses <code class="docutils literal"><span class="pre">![]()</span></code> tag by default to insert uploaded image file. This generates a simple (X)HTML <code class="docutils literal"><span class="pre">&lt;image&gt;</span></code> tag.
If you wish to have more control and use your own HTML tags, you may create a custom <code class="docutils literal"><span class="pre">form_valid()</span></code> function in
<code class="docutils literal"><span class="pre">ImageUploadView</span></code> class, as highlighted <a class="reference external" href="https://github.com/neutronX/django-markdownx/blob/master/markdownx/views.py#L55-L82">here</a>.</p>
</div>
</div>
</div>
@ -359,7 +286,7 @@ If you wish to have more control and use your own HTML tags, you may create a cu
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'2.0.16',
VERSION:'2.0.19',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,

View file

@ -9,7 +9,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Index &mdash; Django Markdownx 2.0.16 documentation</title>
<title>Index &mdash; Django Markdownx 2.0.19 documentation</title>
@ -36,7 +36,7 @@
<link rel="index" title="Index"
href="#"/>
<link rel="search" title="Search" href="search.html"/>
<link rel="top" title="Django Markdownx 2.0.16 documentation" href="index.html"/>
<link rel="top" title="Django Markdownx 2.0.19 documentation" href="index.html"/>
<script src="_static/js/modernizr.min.js"></script>
@ -411,7 +411,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'2.0.16',
VERSION:'2.0.19',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,

View file

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Getting Started &mdash; Django Markdownx 2.0.16 documentation</title>
<title>Getting Started &mdash; Django Markdownx 2.0.19 documentation</title>
@ -35,7 +35,7 @@
<link rel="index" title="Index"
href="genindex.html"/>
<link rel="search" title="Search" href="search.html"/>
<link rel="top" title="Django Markdownx 2.0.16 documentation" href="index.html"/>
<link rel="top" title="Django Markdownx 2.0.19 documentation" href="index.html"/>
<link rel="next" title="Example" href="example.html"/>
<link rel="prev" title="Installation" href="installation.html"/>
@ -253,7 +253,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'2.0.16',
VERSION:'2.0.19',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,

View file

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Django MarkdownX &mdash; Django Markdownx 2.0.16 documentation</title>
<title>Django MarkdownX &mdash; Django Markdownx 2.0.19 documentation</title>
@ -35,7 +35,7 @@
<link rel="index" title="Index"
href="genindex.html"/>
<link rel="search" title="Search" href="search.html"/>
<link rel="top" title="Django Markdownx 2.0.16 documentation" href="#"/>
<link rel="top" title="Django Markdownx 2.0.19 documentation" href="#"/>
<link rel="next" title="Installation" href="installation.html"/>
@ -211,12 +211,11 @@ Python web framework, with flexibility, extensibility, and ease-of-use at its co
<li class="toctree-l2"><a class="reference internal" href="example.html#model">Model</a></li>
<li class="toctree-l2"><a class="reference internal" href="example.html#form">Form</a></li>
<li class="toctree-l2"><a class="reference internal" href="example.html#django-admin">Django Admin</a></li>
<li class="toctree-l2"><a class="reference internal" href="example.html#advanced">Advanced</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="customization.html">Customization</a><ul>
<li class="toctree-l2"><a class="reference internal" href="customization.html#quick-reference">Quick Reference</a></li>
<li class="toctree-l2"><a class="reference internal" href="customization.html#details-and-examples">Details and examples</a></li>
<li class="toctree-l2"><a class="reference internal" href="customization.html#general-ex-settings">General (ex. settings)</a></li>
<li class="toctree-l2"><a class="reference internal" href="customization.html#settings">Settings</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="translation.html">Translation</a><ul>
@ -306,7 +305,7 @@ found on our <a class="reference external" href="https://github.com/adi-/django-
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'2.0.16',
VERSION:'2.0.19',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,

View file

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Installation &mdash; Django Markdownx 2.0.16 documentation</title>
<title>Installation &mdash; Django Markdownx 2.0.19 documentation</title>
@ -35,7 +35,7 @@
<link rel="index" title="Index"
href="genindex.html"/>
<link rel="search" title="Search" href="search.html"/>
<link rel="top" title="Django Markdownx 2.0.16 documentation" href="index.html"/>
<link rel="top" title="Django Markdownx 2.0.19 documentation" href="index.html"/>
<link rel="next" title="Getting Started" href="getting_started.html"/>
<link rel="prev" title="Django MarkdownX" href="index.html"/>
@ -243,7 +243,7 @@ you have multiple versions installed on your machine:</p>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'2.0.16',
VERSION:'2.0.19',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,

View file

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>JavaScript Code &mdash; Django Markdownx 2.0.16 documentation</title>
<title>JavaScript Code &mdash; Django Markdownx 2.0.19 documentation</title>
@ -35,7 +35,7 @@
<link rel="index" title="Index"
href="../genindex.html"/>
<link rel="search" title="Search" href="../search.html"/>
<link rel="top" title="Django Markdownx 2.0.16 documentation" href="../index.html"/>
<link rel="top" title="Django Markdownx 2.0.19 documentation" href="../index.html"/>
<link rel="up" title="JavaScript" href="js.html"/>
<link rel="next" title="MarkdownX" href="docs/markdownx.html"/>
<link rel="prev" title="JavaScript" href="js.html"/>
@ -233,7 +233,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../',
VERSION:'2.0.16',
VERSION:'2.0.19',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,

View file

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>MarkdownX &mdash; Django Markdownx 2.0.16 documentation</title>
<title>MarkdownX &mdash; Django Markdownx 2.0.19 documentation</title>
@ -35,7 +35,7 @@
<link rel="index" title="Index"
href="../../genindex.html"/>
<link rel="search" title="Search" href="../../search.html"/>
<link rel="top" title="Django Markdownx 2.0.16 documentation" href="../../index.html"/>
<link rel="top" title="Django Markdownx 2.0.19 documentation" href="../../index.html"/>
<link rel="up" title="JavaScript Code" href="../docs.html"/>
<link rel="next" title="Utilities" href="utils.html"/>
<link rel="prev" title="JavaScript Code" href="../docs.html"/>
@ -434,7 +434,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../',
VERSION:'2.0.16',
VERSION:'2.0.19',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,

View file

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Utilities &mdash; Django Markdownx 2.0.16 documentation</title>
<title>Utilities &mdash; Django Markdownx 2.0.19 documentation</title>
@ -35,7 +35,7 @@
<link rel="index" title="Index"
href="../../genindex.html"/>
<link rel="search" title="Search" href="../../search.html"/>
<link rel="top" title="Django Markdownx 2.0.16 documentation" href="../../index.html"/>
<link rel="top" title="Django Markdownx 2.0.19 documentation" href="../../index.html"/>
<link rel="up" title="JavaScript Code" href="../docs.html"/>
<link rel="next" title="Events" href="../events.html"/>
<link rel="prev" title="MarkdownX" href="markdownx.html"/>
@ -280,7 +280,7 @@ Default is <code class="docutils literal"><span class="pre">true</span></code>.<
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../',
VERSION:'2.0.16',
VERSION:'2.0.19',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,

View file

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Events &mdash; Django Markdownx 2.0.16 documentation</title>
<title>Events &mdash; Django Markdownx 2.0.19 documentation</title>
@ -35,7 +35,7 @@
<link rel="index" title="Index"
href="../genindex.html"/>
<link rel="search" title="Search" href="../search.html"/>
<link rel="top" title="Django Markdownx 2.0.16 documentation" href="../index.html"/>
<link rel="top" title="Django Markdownx 2.0.19 documentation" href="../index.html"/>
<link rel="up" title="JavaScript" href="js.html"/>
<link rel="next" title="MarkdownX Modules" href="../markdownx/markdownx.html"/>
<link rel="prev" title="Utilities" href="docs/utils.html"/>
@ -321,7 +321,7 @@ JavaScript, you may take advantage of event listeners as exemplified below.</p>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../',
VERSION:'2.0.16',
VERSION:'2.0.19',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,

View file

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>JavaScript &mdash; Django Markdownx 2.0.16 documentation</title>
<title>JavaScript &mdash; Django Markdownx 2.0.19 documentation</title>
@ -35,7 +35,7 @@
<link rel="index" title="Index"
href="../genindex.html"/>
<link rel="search" title="Search" href="../search.html"/>
<link rel="top" title="Django Markdownx 2.0.16 documentation" href="../index.html"/>
<link rel="top" title="Django Markdownx 2.0.19 documentation" href="../index.html"/>
<link rel="next" title="JavaScript Code" href="docs.html"/>
<link rel="prev" title="Translation" href="../translation.html"/>
@ -237,7 +237,7 @@ specifically IE 10+. See additional detailed on <a class="reference external" hr
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../',
VERSION:'2.0.16',
VERSION:'2.0.19',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,

View file

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>License &mdash; Django Markdownx 2.0.16 documentation</title>
<title>License &mdash; Django Markdownx 2.0.19 documentation</title>
@ -35,7 +35,7 @@
<link rel="index" title="Index"
href="genindex.html"/>
<link rel="search" title="Search" href="search.html"/>
<link rel="top" title="Django Markdownx 2.0.16 documentation" href="index.html"/>
<link rel="top" title="Django Markdownx 2.0.19 documentation" href="index.html"/>
<link rel="prev" title="Contributions" href="contribution.html"/>
@ -229,7 +229,7 @@ software, even if advised of the possibility of such damage.</p>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'2.0.16',
VERSION:'2.0.19',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,

View file

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Admin &mdash; Django Markdownx 2.0.16 documentation</title>
<title>Admin &mdash; Django Markdownx 2.0.19 documentation</title>
@ -35,7 +35,7 @@
<link rel="index" title="Index"
href="../../genindex.html"/>
<link rel="search" title="Search" href="../../search.html"/>
<link rel="top" title="Django Markdownx 2.0.16 documentation" href="../../index.html"/>
<link rel="top" title="Django Markdownx 2.0.19 documentation" href="../../index.html"/>
<link rel="up" title="MarkdownX Modules" href="../markdownx.html"/>
<link rel="next" title="Exceptions" href="exceptions.html"/>
<link rel="prev" title="MarkdownX Modules" href="../markdownx.html"/>
@ -235,7 +235,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../',
VERSION:'2.0.16',
VERSION:'2.0.19',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,

View file

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Exceptions &mdash; Django Markdownx 2.0.16 documentation</title>
<title>Exceptions &mdash; Django Markdownx 2.0.19 documentation</title>
@ -35,7 +35,7 @@
<link rel="index" title="Index"
href="../../genindex.html"/>
<link rel="search" title="Search" href="../../search.html"/>
<link rel="top" title="Django Markdownx 2.0.16 documentation" href="../../index.html"/>
<link rel="top" title="Django Markdownx 2.0.19 documentation" href="../../index.html"/>
<link rel="up" title="MarkdownX Modules" href="../markdownx.html"/>
<link rel="next" title="Fields" href="fields.html"/>
<link rel="prev" title="Admin" href="admins.html"/>
@ -301,7 +301,7 @@ or if default, in <span class="guilabel">markdownx/settings.py</span>.</p>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../',
VERSION:'2.0.16',
VERSION:'2.0.19',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,

View file

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Fields &mdash; Django Markdownx 2.0.16 documentation</title>
<title>Fields &mdash; Django Markdownx 2.0.19 documentation</title>
@ -35,7 +35,7 @@
<link rel="index" title="Index"
href="../../genindex.html"/>
<link rel="search" title="Search" href="../../search.html"/>
<link rel="top" title="Django Markdownx 2.0.16 documentation" href="../../index.html"/>
<link rel="top" title="Django Markdownx 2.0.19 documentation" href="../../index.html"/>
<link rel="up" title="MarkdownX Modules" href="../markdownx.html"/>
<link rel="next" title="Form" href="forms.html"/>
<link rel="prev" title="Exceptions" href="exceptions.html"/>
@ -234,7 +234,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../',
VERSION:'2.0.16',
VERSION:'2.0.19',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,

View file

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Form &mdash; Django Markdownx 2.0.16 documentation</title>
<title>Form &mdash; Django Markdownx 2.0.19 documentation</title>
@ -35,7 +35,7 @@
<link rel="index" title="Index"
href="../../genindex.html"/>
<link rel="search" title="Search" href="../../search.html"/>
<link rel="top" title="Django Markdownx 2.0.16 documentation" href="../../index.html"/>
<link rel="top" title="Django Markdownx 2.0.19 documentation" href="../../index.html"/>
<link rel="up" title="MarkdownX Modules" href="../markdownx.html"/>
<link rel="next" title="Models" href="models.html"/>
<link rel="prev" title="Fields" href="fields.html"/>
@ -292,7 +292,7 @@ else <code class="docutils literal"><span class="pre">namedtuple(path,</span> <s
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../',
VERSION:'2.0.16',
VERSION:'2.0.19',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,

View file

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Models &mdash; Django Markdownx 2.0.16 documentation</title>
<title>Models &mdash; Django Markdownx 2.0.19 documentation</title>
@ -35,7 +35,7 @@
<link rel="index" title="Index"
href="../../genindex.html"/>
<link rel="search" title="Search" href="../../search.html"/>
<link rel="top" title="Django Markdownx 2.0.16 documentation" href="../../index.html"/>
<link rel="top" title="Django Markdownx 2.0.19 documentation" href="../../index.html"/>
<link rel="up" title="MarkdownX Modules" href="../markdownx.html"/>
<link rel="next" title="URLs" href="urls.html"/>
<link rel="prev" title="Form" href="forms.html"/>
@ -283,7 +283,7 @@ information.</li>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../',
VERSION:'2.0.16',
VERSION:'2.0.19',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,

View file

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Utilities &mdash; Django Markdownx 2.0.16 documentation</title>
<title>Utilities &mdash; Django Markdownx 2.0.19 documentation</title>
@ -35,7 +35,7 @@
<link rel="index" title="Index"
href="../../genindex.html"/>
<link rel="search" title="Search" href="../../search.html"/>
<link rel="top" title="Django Markdownx 2.0.16 documentation" href="../../index.html"/>
<link rel="top" title="Django Markdownx 2.0.19 documentation" href="../../index.html"/>
<link rel="up" title="MarkdownX Modules" href="../markdownx.html"/>
<link rel="next" title="Views" href="views.html"/>
<link rel="prev" title="URLs" href="urls.html"/>
@ -230,13 +230,13 @@
<dl class="function">
<dt id="markdownx.utils.xml_has_javascript">
<code class="descclassname">markdownx.utils.</code><code class="descname">xml_has_javascript</code><span class="sig-paren">(</span><em>data</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/markdownx/utils.html#xml_has_javascript"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#markdownx.utils.xml_has_javascript" title="Permalink to this definition"></a></dt>
<dd><p>Checks XML for JavaScript. See &#8220;security&#8221; in <a class="reference internal" href="../../customization.html"><span class="doc">customization</span></a> for
<dd><p>Checks XML for JavaScript. See &#8220;security&#8221; in <a class="reference internal" href="../../customization.html"><span class="doc">customization</span></a> for
additional information.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>data</strong> (<em>str</em>) &#8211; Contents to be monitored for JavaScript injection.</td>
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>data</strong> (<em>str</em><em>, </em><em>bytes</em>) &#8211; Contents to be monitored for JavaScript injection.</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><code class="docutils literal"><span class="pre">True</span></code> if <strong>data</strong> contains JavaScript tag(s), otherwise <code class="docutils literal"><span class="pre">False</span></code>.</td>
</tr>
@ -292,7 +292,7 @@ additional information.</p>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../',
VERSION:'2.0.16',
VERSION:'2.0.19',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,

View file

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Views &mdash; Django Markdownx 2.0.16 documentation</title>
<title>Views &mdash; Django Markdownx 2.0.19 documentation</title>
@ -35,7 +35,7 @@
<link rel="index" title="Index"
href="../../genindex.html"/>
<link rel="search" title="Search" href="../../search.html"/>
<link rel="top" title="Django Markdownx 2.0.16 documentation" href="../../index.html"/>
<link rel="top" title="Django Markdownx 2.0.19 documentation" href="../../index.html"/>
<link rel="up" title="MarkdownX Modules" href="../markdownx.html"/>
<link rel="next" title="Contributions" href="../../contribution.html"/>
<link rel="prev" title="Utilities" href="utilities.html"/>
@ -317,7 +317,7 @@ function in settings under <code class="docutils literal"><span class="pre">MARK
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../',
VERSION:'2.0.16',
VERSION:'2.0.19',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,

View file

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>MarkdownX Modules &mdash; Django Markdownx 2.0.16 documentation</title>
<title>MarkdownX Modules &mdash; Django Markdownx 2.0.19 documentation</title>
@ -35,7 +35,7 @@
<link rel="index" title="Index"
href="../genindex.html"/>
<link rel="search" title="Search" href="../search.html"/>
<link rel="top" title="Django Markdownx 2.0.16 documentation" href="../index.html"/>
<link rel="top" title="Django Markdownx 2.0.19 documentation" href="../index.html"/>
<link rel="next" title="Admin" href="docs/admins.html"/>
<link rel="prev" title="Events" href="../js/events.html"/>
@ -232,7 +232,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../',
VERSION:'2.0.16',
VERSION:'2.0.19',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,

View file

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Python Module Index &mdash; Django Markdownx 2.0.16 documentation</title>
<title>Python Module Index &mdash; Django Markdownx 2.0.19 documentation</title>
@ -35,7 +35,7 @@
<link rel="index" title="Index"
href="genindex.html"/>
<link rel="search" title="Search" href="search.html"/>
<link rel="top" title="Django Markdownx 2.0.16 documentation" href="index.html"/>
<link rel="top" title="Django Markdownx 2.0.19 documentation" href="index.html"/>
@ -255,7 +255,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'2.0.16',
VERSION:'2.0.19',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,

View file

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Search &mdash; Django Markdownx 2.0.16 documentation</title>
<title>Search &mdash; Django Markdownx 2.0.19 documentation</title>
@ -35,7 +35,7 @@
<link rel="index" title="Index"
href="genindex.html"/>
<link rel="search" title="Search" href="#"/>
<link rel="top" title="Django Markdownx 2.0.16 documentation" href="index.html"/>
<link rel="top" title="Django Markdownx 2.0.19 documentation" href="index.html"/>
<script src="_static/js/modernizr.min.js"></script>
@ -204,7 +204,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'2.0.16',
VERSION:'2.0.19',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,

File diff suppressed because one or more lines are too long

View file

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Translation &mdash; Django Markdownx 2.0.16 documentation</title>
<title>Translation &mdash; Django Markdownx 2.0.19 documentation</title>
@ -35,7 +35,7 @@
<link rel="index" title="Index"
href="genindex.html"/>
<link rel="search" title="Search" href="search.html"/>
<link rel="top" title="Django Markdownx 2.0.16 documentation" href="index.html"/>
<link rel="top" title="Django Markdownx 2.0.19 documentation" href="index.html"/>
<link rel="next" title="JavaScript" href="js/js.html"/>
<link rel="prev" title="Customization" href="customization.html"/>
@ -245,7 +245,7 @@ produced by <strong>MarkdownX</strong> to various languages.</p>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'2.0.16',
VERSION:'2.0.19',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,