diff --git a/js/functions.js b/js/functions.js
index dd7e60e420..0ba3467635 100644
--- a/js/functions.js
+++ b/js/functions.js
@@ -2312,11 +2312,14 @@ $(document).ready(function() {
/**
* Display the dialog to the user
*/
- $('
'+data.message+'
').dialog({
- width: 450,
- buttons: button_options,
- title: data.title
- }).find('textarea').width('100%');
+ var $ajaxDialog = $(''+data.message+'
').dialog({
+ width: 500,
+ buttons: button_options,
+ title: data.title
+ });
+ // Attach syntax highlited editor to export dialog
+ var elm = $ajaxDialog.find('textarea');
+ CodeMirror.fromTextArea(elm[0], {lineNumbers: true, matchBrackets: true, indentUnit: 4, mode: "text/x-mysql"});
} else {
PMA_ajaxShowMessage(data.error);
}