mirror of
https://github.com/fastmail/Squire.git
synced 2025-03-12 15:41:19 -05:00
Add: Refactoring isPresent
This commit is contained in:
parent
8479a7e1c7
commit
9312e0bfaf
1 changed files with 5 additions and 5 deletions
|
@ -48,17 +48,17 @@ $(document).ready(function () {
|
|||
});
|
||||
};
|
||||
|
||||
SquireUI.isBold = isPresent( 'B', ( />B\b/ ) );
|
||||
SquireUI.isItalic = isPresent( 'I', ( />I\b/ ) );
|
||||
SquireUI.isUnderlined = isPresent( 'U', ( />U\b/ ) );
|
||||
SquireUI.isStriked = isPresent( 'S', ( />S\b/ ) );
|
||||
SquireUI.isBold = function (editor) { isPresent( 'B', ( />B\b/ ), editor ) };
|
||||
SquireUI.isItalic = function (editor) { isPresent( 'I', ( />I\b/ ) );
|
||||
SquireUI.isUnderlined = function (editor) { isPresent( 'U', ( />U\b/ ) );
|
||||
SquireUI.isStriked = function (editor) { isPresent( 'S', ( />S\b/ ) );
|
||||
SquireUI.isLink = isPresent( 'A', ( />A\b/ ) );
|
||||
SquireUI.isPresent = function () {
|
||||
editor.getPath()
|
||||
};
|
||||
|
||||
SquireUI.whenTextSelected = function () {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue