0
Fork 0
mirror of https://github.com/fastmail/Squire.git synced 2024-12-22 07:13:08 -05:00

Make bold etc. work in demo without requiring text selection.

This commit is contained in:
Neil Jenkins 2014-12-10 14:18:44 +11:00
parent 9e3fa11d4c
commit 2a3dbe1b1c
4 changed files with 27 additions and 24 deletions

View file

@ -57,6 +57,7 @@ iframe {
background:#FFF;
padding:10px;
border-left:1px #EEE solid;
border-bottom: 3px transparent solid;
-webkit-font-smoothing:subpixel-antialiased
}
@ -109,7 +110,7 @@ input[type=text] {
}
.menu .group .item:hover, .menu .item:first-child:hover {
border-left: 3px #55ACEE solid;
border-bottom: 3px #55ACEE solid;
}
.menu .item:first-child {

File diff suppressed because one or more lines are too long

View file

@ -57,6 +57,7 @@ iframe {
background:#FFF;
padding:10px;
border-left:1px #EEE solid;
border-bottom: 3px transparent solid;
-webkit-font-smoothing:subpixel-antialiased
}
@ -109,7 +110,7 @@ input[type=text] {
}
.menu .group .item:hover, .menu .item:first-child:hover {
border-left: 3px #55ACEE solid;
border-bottom: 3px #55ACEE solid;
}
.menu .item:first-child {

View file

@ -143,8 +143,8 @@ $(document).ready(function() {
} else if (test.isNotValue('makeLink') | test.isNotValue('insertImage') | test.isNotValue('selectFont')) {
// do nothing these are dropdowns.
} else {
if (editor.getSelectedText() === '' && !(action == 'insertImage' || action == 'makeOrderedList' || action == 'increaseQuoteLevel' || action == 'redo' || action == 'undo')) return;
editor[action]();
editor.focus();
}
});
});