-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
175 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule gutenberg
updated
from 296f94 to 086f51
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import UIKit | ||
import RNReactNativeGutenbergBridge | ||
|
||
class ShortcutCoordinator: UIResponder { | ||
let gutenberg: Gutenberg | ||
var responder: UIResponder? | ||
init(gutenberg: Gutenberg) { | ||
self.gutenberg = gutenberg | ||
} | ||
|
||
@objc func toggleBold() { | ||
gutenberg.sendShortcut(.bold) | ||
} | ||
|
||
@objc func toggleItalic() { | ||
gutenberg.sendShortcut(.italic) | ||
} | ||
|
||
override var next: UIResponder? { | ||
return responder | ||
} | ||
|
||
static let shortcuts = [ | ||
UIKeyCommand(input:"B", | ||
modifierFlags: .command, | ||
action:#selector(toggleBold), | ||
discoverabilityTitle:NSLocalizedString("Bold", comment: "Discoverability title for bold formatting keyboard shortcut.") | ||
), | ||
UIKeyCommand(input:"I", | ||
modifierFlags: .command, | ||
action:#selector(toggleItalic), | ||
discoverabilityTitle:NSLocalizedString("Italic", comment: "Discoverability title for italic formatting keyboard shortcut.") | ||
) | ||
] | ||
} | ||
|
7 changes: 2 additions & 5 deletions
7
...c/main/java/org/wordpress/mobile/ReactNativeGutenbergBridge/GutenbergBridgeJS2Parent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.