diff --git a/www/common/common-ui-elements.js b/www/common/common-ui-elements.js index c8bb6f1c7..c426a0272 100644 --- a/www/common/common-ui-elements.js +++ b/www/common/common-ui-elements.js @@ -372,6 +372,15 @@ define([ return $toolbar; }; UIElements.createMarkdownToolbar = function (common, editor) { + var readOnly = common.getMetadataMgr().getPrivateData().readOnly; + if (readOnly) { + return { + toolbar: $(), + button: $(), + setState: function () {} + }; + } + var $toolbar = createMdToolbar(common, editor); var cfg = { title: Messages.mdToolbar_button,