|
|
@ -223,7 +223,7 @@ define([
|
|
|
|
|
|
|
|
|
|
|
|
var $previewButton = APP.$previewButton = Cryptpad.createButton(null, true);
|
|
|
|
var $previewButton = APP.$previewButton = Cryptpad.createButton(null, true);
|
|
|
|
$previewButton.removeClass('fa-question').addClass('fa-eye');
|
|
|
|
$previewButton.removeClass('fa-question').addClass('fa-eye');
|
|
|
|
$previewButton.attr('title', 'TODO Preview'); //TODO
|
|
|
|
$previewButton.attr('title', Messages.previewButtonTitle);
|
|
|
|
$previewButton.click(function () {
|
|
|
|
$previewButton.click(function () {
|
|
|
|
var $codeMirror = $iframe.find('.CodeMirror');
|
|
|
|
var $codeMirror = $iframe.find('.CodeMirror');
|
|
|
|
if (CodeMirror.highlightMode !== 'markdown') {
|
|
|
|
if (CodeMirror.highlightMode !== 'markdown') {
|
|
|
@ -239,7 +239,9 @@ define([
|
|
|
|
$rightside.append($previewButton);
|
|
|
|
$rightside.append($previewButton);
|
|
|
|
|
|
|
|
|
|
|
|
if (!readOnly) {
|
|
|
|
if (!readOnly) {
|
|
|
|
CodeMirror.configureLanguage(CodeMirror.configureTheme, onModeChanged);
|
|
|
|
CodeMirror.configureTheme(function () {
|
|
|
|
|
|
|
|
CodeMirror.configureLanguage(null, onModeChanged);
|
|
|
|
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
CodeMirror.configureTheme();
|
|
|
|
CodeMirror.configureTheme();
|
|
|
|