jquery-markedit icon indicating copy to clipboard operation
jquery-markedit copied to clipboard

Add a 'selector' options for the preview that permits to put the preview in any user-defined element

Open allan-simon opened this issue 12 years ago • 0 comments

For example being able to do

'preview' : 'selector' ,
'selector' : '#mydiv' 

and being able to have the preview in that div

I already implemented it here's the diff

index 11f41ff..9e6e6a9 100644
--- a/app/resources/skins/responsive/js/external/jquery.markedit.js
+++ b/app/resources/skins/responsive/js/external/jquery.markedit.js
@@ -338,6 +338,9 @@
                     $(this).markeditBindAutoPreview(previewPane);

                 }
+                else if (options.preview === 'selector') {
+                    $(this).markeditBindAutoPreview($(options.selector));
+                }
                 else if (options.preview !== false) {
                     throw "Preview option '" + options.preview + "' is not recognized.";
                 }

allan-simon avatar Jun 17 '13 21:06 allan-simon