Hide the markdown toolbar in read-only mode

pull/1/head
yflory 7 years ago
parent 3177fd7857
commit 78f738143b

@ -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,

Loading…
Cancel
Save