Browse Source

Fixed editor z-index on fullscreen #591

develop
pandao 6 years ago
parent
commit
1008e2ced9
  1. 7
      css/editormd.css
  2. 4
      css/editormd.min.css
  3. 3
      css/editormd.preview.css
  4. 2
      css/editormd.preview.min.css
  5. 19
      editormd.amd.js
  6. 2
      editormd.amd.min.js
  7. 19
      editormd.js
  8. 2
      editormd.min.js
  9. 2
      lib/codemirror/modes.min.js
  10. 2
      scss/editormd.dialog.scss
  11. 4
      scss/editormd.preview.scss
  12. 2
      scss/editormd.scss
  13. 19
      src/editormd.js

7
css/editormd.css

@ -389,7 +389,7 @@
/* W3C */
filter: alpha(opacity=20);
/* IE */
z-index: 99998;
z-index: 9998;
}
.editormd-container-mask,
@ -4535,6 +4535,9 @@ li.L9 {
.markdown-body .editormd-toc-menu ul {
padding-left: 0;
}
.markdown-body img {
background: none;
}
.markdown-body .highlight pre, .markdown-body pre {
line-height: 1.6;
}
@ -4760,7 +4763,7 @@ hr.editormd-page-break {
top: 0;
left: 0;
border: none;
margin: 0 auto;
margin: 0 auto !important;
}
/* Editor.md Dark theme */

4
css/editormd.min.css

File diff suppressed because one or more lines are too long

3
css/editormd.preview.css

@ -3817,6 +3817,9 @@ li.L9 {
.markdown-body .editormd-toc-menu ul {
padding-left: 0;
}
.markdown-body img {
background: none;
}
.markdown-body .highlight pre, .markdown-body pre {
line-height: 1.6;
}

2
css/editormd.preview.min.css

File diff suppressed because one or more lines are too long

19
editormd.amd.js

@ -395,7 +395,7 @@
tex : editormd.classPrefix + "tex"
};
editormd.dialogZindex = 99999;
editormd.dialogZindex = 9999;
editormd.$katex = null;
editormd.$marked = null;
@ -1861,11 +1861,18 @@
editor.css("height", (typeof height === "number") ? height + "px" : height);
}
var hasToolbar = settings.toolbar && !settings.readOnly;
var toolbarHeight = hasToolbar && toolbar ? toolbar.height() : 0;
var $codeMirrorGutters = codeMirror.find('.CodeMirror-gutters');
if (state.fullscreen) {
editor.height($(window).height());
$codeMirrorGutters.height($(window).height() - toolbarHeight);
} else {
$codeMirrorGutters.height(editor.height() - toolbarHeight);
}
if (settings.toolbar && !settings.readOnly) {
if (hasToolbar) {
codeMirror.css("margin-top", toolbar.height() + 1).height(editor.height() - toolbar.height());
} else {
codeMirror.css("margin-top", 0).height(editor.height());
@ -2567,7 +2574,8 @@
editor.css({
width : $(window).width(),
height : $(window).height()
height : $(window).height(),
zIndex : editormd.dialogZindex,
}).addClass(fullscreenClass);
this.resize();
@ -2607,7 +2615,8 @@
editor.css({
width : editor.data("oldWidth"),
height : editor.data("oldHeight")
height : editor.data("oldHeight"),
zIndex : ''
}).removeClass(fullscreenClass);
this.resize();
@ -4064,7 +4073,7 @@
buttons : false
};
options = $.extend(true, defaults, options);
options = $.extend(true, {}, defaults, options);
var $this = this;
var editor = this.editor;

2
editormd.amd.min.js

File diff suppressed because one or more lines are too long

19
editormd.js

@ -325,7 +325,7 @@
tex : editormd.classPrefix + "tex"
};
editormd.dialogZindex = 99999;
editormd.dialogZindex = 9999;
editormd.$katex = null;
editormd.$marked = null;
@ -1791,11 +1791,18 @@
editor.css("height", (typeof height === "number") ? height + "px" : height);
}
var hasToolbar = settings.toolbar && !settings.readOnly;
var toolbarHeight = hasToolbar && toolbar ? toolbar.height() : 0;
var $codeMirrorGutters = codeMirror.find('.CodeMirror-gutters');
if (state.fullscreen) {
editor.height($(window).height());
$codeMirrorGutters.height($(window).height() - toolbarHeight);
} else {
$codeMirrorGutters.height(editor.height() - toolbarHeight);
}
if (settings.toolbar && !settings.readOnly) {
if (hasToolbar) {
codeMirror.css("margin-top", toolbar.height() + 1).height(editor.height() - toolbar.height());
} else {
codeMirror.css("margin-top", 0).height(editor.height());
@ -2497,7 +2504,8 @@
editor.css({
width : $(window).width(),
height : $(window).height()
height : $(window).height(),
zIndex : editormd.dialogZindex,
}).addClass(fullscreenClass);
this.resize();
@ -2537,7 +2545,8 @@
editor.css({
width : editor.data("oldWidth"),
height : editor.data("oldHeight")
height : editor.data("oldHeight"),
zIndex : ''
}).removeClass(fullscreenClass);
this.resize();
@ -3994,7 +4003,7 @@
buttons : false
};
options = $.extend(true, defaults, options);
options = $.extend(true, {}, defaults, options);
var $this = this;
var editor = this.editor;

2
editormd.min.js

File diff suppressed because one or more lines are too long

2
lib/codemirror/modes.min.js

File diff suppressed because one or more lines are too long

2
scss/editormd.dialog.scss

@ -134,7 +134,7 @@
position: fixed;
background: #000;
@include opacity(0.2);
z-index: 99998;
z-index: 9998;
}
#{$prefix}container-mask,

4
scss/editormd.preview.scss

@ -289,6 +289,10 @@
}
}
img {
background: none;
}
.highlight pre, pre {
line-height: 1.6;
}

2
scss/editormd.scss

@ -131,7 +131,7 @@
top : 0;
left : 0;
border: none;
margin: 0 auto;
margin: 0 auto!important;
}
@import "editormd.themes";

19
src/editormd.js

@ -313,7 +313,7 @@
tex : editormd.classPrefix + "tex"
};
editormd.dialogZindex = 99999;
editormd.dialogZindex = 9999;
editormd.$katex = null;
editormd.$marked = null;
@ -1779,11 +1779,18 @@
editor.css("height", (typeof height === "number") ? height + "px" : height);
}
var hasToolbar = settings.toolbar && !settings.readOnly;
var toolbarHeight = hasToolbar && toolbar ? toolbar.height() : 0;
var $codeMirrorGutters = codeMirror.find('.CodeMirror-gutters');
if (state.fullscreen) {
editor.height($(window).height());
$codeMirrorGutters.height($(window).height() - toolbarHeight);
} else {
$codeMirrorGutters.height(editor.height() - toolbarHeight);
}
if (settings.toolbar && !settings.readOnly) {
if (hasToolbar) {
codeMirror.css("margin-top", toolbar.height() + 1).height(editor.height() - toolbar.height());
} else {
codeMirror.css("margin-top", 0).height(editor.height());
@ -2485,7 +2492,8 @@
editor.css({
width : $(window).width(),
height : $(window).height()
height : $(window).height(),
zIndex : editormd.dialogZindex,
}).addClass(fullscreenClass);
this.resize();
@ -2525,7 +2533,8 @@
editor.css({
width : editor.data("oldWidth"),
height : editor.data("oldHeight")
height : editor.data("oldHeight"),
zIndex : ''
}).removeClass(fullscreenClass);
this.resize();
@ -3982,7 +3991,7 @@
buttons : false
};
options = $.extend(true, defaults, options);
options = $.extend(true, {}, defaults, options);
var $this = this;
var editor = this.editor;

Loading…
Cancel
Save