mirror of
https://github.com/fastmail/Squire.git
synced 2024-12-22 15:23:29 -05:00
Make bold etc. work in demo without requiring text selection.
This commit is contained in:
parent
9e3fa11d4c
commit
2a3dbe1b1c
4 changed files with 27 additions and 24 deletions
|
@ -57,6 +57,7 @@ iframe {
|
||||||
background:#FFF;
|
background:#FFF;
|
||||||
padding:10px;
|
padding:10px;
|
||||||
border-left:1px #EEE solid;
|
border-left:1px #EEE solid;
|
||||||
|
border-bottom: 3px transparent solid;
|
||||||
-webkit-font-smoothing:subpixel-antialiased
|
-webkit-font-smoothing:subpixel-antialiased
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -109,7 +110,7 @@ input[type=text] {
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu .group .item:hover, .menu .item:first-child:hover {
|
.menu .group .item:hover, .menu .item:first-child:hover {
|
||||||
border-left: 3px #55ACEE solid;
|
border-bottom: 3px #55ACEE solid;
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu .item:first-child {
|
.menu .item:first-child {
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -57,6 +57,7 @@ iframe {
|
||||||
background:#FFF;
|
background:#FFF;
|
||||||
padding:10px;
|
padding:10px;
|
||||||
border-left:1px #EEE solid;
|
border-left:1px #EEE solid;
|
||||||
|
border-bottom: 3px transparent solid;
|
||||||
-webkit-font-smoothing:subpixel-antialiased
|
-webkit-font-smoothing:subpixel-antialiased
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -109,7 +110,7 @@ input[type=text] {
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu .group .item:hover, .menu .item:first-child:hover {
|
.menu .group .item:hover, .menu .item:first-child:hover {
|
||||||
border-left: 3px #55ACEE solid;
|
border-bottom: 3px #55ACEE solid;
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu .item:first-child {
|
.menu .item:first-child {
|
||||||
|
|
|
@ -143,8 +143,8 @@ $(document).ready(function() {
|
||||||
} else if (test.isNotValue('makeLink') | test.isNotValue('insertImage') | test.isNotValue('selectFont')) {
|
} else if (test.isNotValue('makeLink') | test.isNotValue('insertImage') | test.isNotValue('selectFont')) {
|
||||||
// do nothing these are dropdowns.
|
// do nothing these are dropdowns.
|
||||||
} else {
|
} else {
|
||||||
if (editor.getSelectedText() === '' && !(action == 'insertImage' || action == 'makeOrderedList' || action == 'increaseQuoteLevel' || action == 'redo' || action == 'undo')) return;
|
|
||||||
editor[action]();
|
editor[action]();
|
||||||
|
editor.focus();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue