0
Fork 0
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:
Matthew Borden 2014-07-08 20:47:54 +10:00
parent 8479a7e1c7
commit 9312e0bfaf

View file

@ -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 () {
}