jquery-markedit
jquery-markedit copied to clipboard
Add a 'selector' options for the preview that permits to put the preview in any user-defined element
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.";
}