mirror of
https://github.com/Ionaru/easy-markdown-editor
synced 2025-07-04 08:34:28 -06:00
@situphen 's review
This commit is contained in:
parent
98fbe56248
commit
eea2917be1
@ -323,7 +323,7 @@
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
background-color: #f9f9f9;
|
background-color: #f9f9f9;
|
||||||
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
|
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
|
||||||
padding: 8px 8px;
|
padding: 8px;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -114,7 +114,7 @@ function fixShortcut(name) {
|
|||||||
* Create dropdown block
|
* Create dropdown block
|
||||||
*/
|
*/
|
||||||
function createToolbarDropdown(options, enableTooltips, shortcuts, parent) {
|
function createToolbarDropdown(options, enableTooltips, shortcuts, parent) {
|
||||||
var el = createToolbarButton(options, enableTooltips, shortcuts, 'div');
|
var el = createToolbarButton(options, enableTooltips, shortcuts, 'div', parent);
|
||||||
el.className += ' easymde-dropdown';
|
el.className += ' easymde-dropdown';
|
||||||
var content = document.createElement('div');
|
var content = document.createElement('div');
|
||||||
content.className = 'easymde-dropdown-content';
|
content.className = 'easymde-dropdown-content';
|
||||||
@ -2282,12 +2282,10 @@ EasyMDE.prototype.createToolbar = function (items) {
|
|||||||
var el;
|
var el;
|
||||||
if (item === '|') {
|
if (item === '|') {
|
||||||
el = createSep();
|
el = createSep();
|
||||||
|
} else if (item.children) {
|
||||||
|
el = createToolbarDropdown(item, self.options.toolbarTips, self.options.shortcuts, self);
|
||||||
} else {
|
} else {
|
||||||
if (item.children) {
|
el = createToolbarButton(item, self.options.toolbarTips, self.options.shortcuts, 'button', self);
|
||||||
el = createToolbarDropdown(item, self.options.toolbarTips, self.options.shortcuts, self);
|
|
||||||
} else {
|
|
||||||
el = createToolbarButton(item, self.options.toolbarTips, self.options.shortcuts, 'button', self);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user