Add the markdown toolbar to the slide and poll apps

This commit is contained in:
yflory
2017-11-27 17:55:20 +01:00
parent 68d602f74a
commit 74e59a513a
9 changed files with 44 additions and 4 deletions

View File

@@ -139,6 +139,11 @@ table#cp-app-poll-table {
width: auto;
display: inline-block;
}
.cp-markdown-toolbar {
margin: auto;
min-width: 80%;
width: 80%;
}
#cp-app-poll-description {
&~ .CodeMirror {
margin: auto;

View File

@@ -258,6 +258,7 @@ define([
};
var setTablePublished = function (bool) {
if (APP.markdownTb) { APP.markdownTb.setState(!bool); }
if (bool) {
if (APP.$publish) { APP.$publish.hide(); }
if (APP.$admin) { APP.$admin.show(); }
@@ -993,6 +994,10 @@ define([
updateDescription(null, APP.proxy.description || '');
initThumbnails();
var markdownTb = APP.markdownTb = common.createMarkdownToolbar(APP.editor);
$('.CodeMirror').parent().prepend(markdownTb.toolbar);
APP.toolbar.$rightside.append(markdownTb.button);
// Initialize author name for comments.
// Disable name modification for logged in users
var $cName = APP.$addComment.find('.cp-app-poll-comments-add-name')