Commits

mitar committed 2d88cc5

Also `page_id` is necessary in preview.

Comments (0)

Files changed (2)

cmsplugin_markup/static/cmsplugin_markup/markup.js

     var preview = $(this);
     $('#id_body').autoPreview(auto_preview_url, {
         'markup': $('#id_markup').val(),
-        'plugin_id': plugin_id
+        'plugin_id': plugin_id,
+        'page_id': page_id
       },
       function (textarea, text, data) {
         preview.html(data);

cmsplugin_markup/templates/cmsplugin_markup/markup_plugin_change_form.html

 <script type="text/javascript">
 /* <![CDATA[ */
 var plugin_id = '{{ plugin.id|escapejs }}';
+var page_id = '{{ request.current_page.id|escapejs }}';
 var auto_preview_timeout = 2.0;{% url cmsplugin_markup_preview as auto_preview_url %}
 var auto_preview_url = '{{ auto_preview_url|escapejs }}';
 /* ]]> */