forked from wikimedia/wikipedia-ios
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add formatter extension to toggle formatting
- Loading branch information
1 parent
c23d425
commit 7de2c81
Showing
2 changed files
with
10 additions
and
0 deletions.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
...urce Editor/Formatter Extensions/WKSourceEditorFormatterStrikethrough+ButtonActions.swift
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,8 @@ | ||
import Foundation | ||
import ComponentsObjC | ||
|
||
extension WKSourceEditorFormatterStrikethrough { | ||
func toggleStrikethroughFormatting(action: WKSourceEditorFormatterButtonAction, in textView: UITextView) { | ||
toggleFormatting(startingFormattingString: "<s>", endingFormattingString: "</s>", action: action, in: textView) | ||
} | ||
} |
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