diff --git a/www/code/inner.js b/www/code/inner.js index dc541e736..200bd4fff 100644 --- a/www/code/inner.js +++ b/www/code/inner.js @@ -360,28 +360,29 @@ define([ CodeMirror.configureTheme(); } - var fileDialogCfg = { - onSelect: function (data) { - if (data.type === 'file') { - var mt = ''; - editor.replaceSelection(mt); - return; + if (!readOnly) { + var fileDialogCfg = { + onSelect: function (data) { + if (data.type === 'file') { + var mt = ''; + editor.replaceSelection(mt); + return; + } } - } - }; - common.initFilePicker(fileDialogCfg); - APP.$mediaTagButton = $('