Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions example/ios/EnrichedTextInputExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
31EE7B79626043278451F7C2 /* Nunito-MediumItalic.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 56DFDD6005684613BABE1A5B /* Nunito-MediumItalic.ttf */; };
44F3116C228D441D96648511 /* Nunito-Bold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = DA817F04F35B4BA1A6C0BB7A /* Nunito-Bold.ttf */; };
475EC9D8C2514408931549DD /* Nunito-Black.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 012D53DFD8C6464DBF6E19E4 /* Nunito-Black.ttf */; };
4B4950F65A47714993F53BB4 /* libPods-EnrichedTextInputExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 95CD629A5570EDEE67260A64 /* libPods-EnrichedTextInputExample.a */; };
4FEAEB180FF94632ADFA7D7D /* Nunito-SemiBoldItalic.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 78A78FF825C747578571B76F /* Nunito-SemiBoldItalic.ttf */; };
56EDC86733EA478B9DA01878 /* CascadiaCode-Medium.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 87375222174145AD85B4DE62 /* CascadiaCode-Medium.ttf */; };
5B86D220CCF04C2A850EB7E8 /* CascadiaCode-MediumItalic.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 78D6C09519344432B162E948 /* CascadiaCode-MediumItalic.ttf */; };
Expand All @@ -36,7 +37,6 @@
95A487B0B0A94AFDA7B10C06 /* FontAwesome.ttf in Resources */ = {isa = PBXBuildFile; fileRef = D133E950DA6A4BC0A97DDFFE /* FontAwesome.ttf */; };
95CD2D9394AA4FD8B184FC56 /* Nunito-Light.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 153B340F016F497BA045811A /* Nunito-Light.ttf */; };
970142F6180042E5964006A6 /* CascadiaCode-Light.ttf in Resources */ = {isa = PBXBuildFile; fileRef = DA76D9192FE24EC28C84DE79 /* CascadiaCode-Light.ttf */; };
9CCBAA226FD195143DDD2884 /* libPods-EnrichedTextInputExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6D370084B15B932DA6ABD7D8 /* libPods-EnrichedTextInputExample.a */; };
A2B3511833CC42D2B563A6C8 /* Nunito-Medium.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 974D908628154101A0445B89 /* Nunito-Medium.ttf */; };
A9294579BC314C709C083877 /* Nunito-SemiBold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 375DF342F26841F6BF549CAB /* Nunito-SemiBold.ttf */; };
B17531A20CBB4D92B0AF89A3 /* Nunito-Italic-VariableFont_wght.ttf in Resources */ = {isa = PBXBuildFile; fileRef = ABF6C071A9704D7F84EAC642 /* Nunito-Italic-VariableFont_wght.ttf */; };
Expand All @@ -58,6 +58,7 @@
13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = PrivacyInfo.xcprivacy; path = EnrichedTextInputExample/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
153B340F016F497BA045811A /* Nunito-Light.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = "Nunito-Light.ttf"; path = "../assets/fonts/Nunito/static/Nunito-Light.ttf"; sourceTree = "<group>"; };
1872D96B58594795BDF6C766 /* Nunito-ExtraLight.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = "Nunito-ExtraLight.ttf"; path = "../assets/fonts/Nunito/static/Nunito-ExtraLight.ttf"; sourceTree = "<group>"; };
371B368B6AB82CCE5511A1CA /* Pods-EnrichedTextInputExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-EnrichedTextInputExample.debug.xcconfig"; path = "Target Support Files/Pods-EnrichedTextInputExample/Pods-EnrichedTextInputExample.debug.xcconfig"; sourceTree = "<group>"; };
375DF342F26841F6BF549CAB /* Nunito-SemiBold.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = "Nunito-SemiBold.ttf"; path = "../assets/fonts/Nunito/static/Nunito-SemiBold.ttf"; sourceTree = "<group>"; };
3A18DEB91C24449AA3ECE59A /* CascadiaCode-Italic-VariableFont_wght.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = "CascadiaCode-Italic-VariableFont_wght.ttf"; path = "../assets/fonts/Cascadia_Code/CascadiaCode-Italic-VariableFont_wght.ttf"; sourceTree = "<group>"; };
3FD646A3FF0F4F33AC65021F /* CascadiaCode-SemiBold.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = "CascadiaCode-SemiBold.ttf"; path = "../assets/fonts/Cascadia_Code/static/CascadiaCode-SemiBold.ttf"; sourceTree = "<group>"; };
Expand All @@ -71,7 +72,7 @@
5D3228FB7E494D31805D6C01 /* Nunito-Regular.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = "Nunito-Regular.ttf"; path = "../assets/fonts/Nunito/static/Nunito-Regular.ttf"; sourceTree = "<group>"; };
6352E13F84F841D5A2BA25B4 /* CascadiaCode-Italic.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = "CascadiaCode-Italic.ttf"; path = "../assets/fonts/Cascadia_Code/static/CascadiaCode-Italic.ttf"; sourceTree = "<group>"; };
674C8E7598D647768ECEC0E1 /* OFL.txt */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = OFL.txt; path = ../assets/fonts/Cascadia_Code/OFL.txt; sourceTree = "<group>"; };
6D370084B15B932DA6ABD7D8 /* libPods-EnrichedTextInputExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-EnrichedTextInputExample.a"; sourceTree = BUILT_PRODUCTS_DIR; };
6918616D8394A3A8000BFE5C /* Pods-EnrichedTextInputExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-EnrichedTextInputExample.release.xcconfig"; path = "Target Support Files/Pods-EnrichedTextInputExample/Pods-EnrichedTextInputExample.release.xcconfig"; sourceTree = "<group>"; };
761780EC2CA45674006654EE /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AppDelegate.swift; path = EnrichedTextInputExample/AppDelegate.swift; sourceTree = "<group>"; };
78A78FF825C747578571B76F /* Nunito-SemiBoldItalic.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = "Nunito-SemiBoldItalic.ttf"; path = "../assets/fonts/Nunito/static/Nunito-SemiBoldItalic.ttf"; sourceTree = "<group>"; };
78D6C09519344432B162E948 /* CascadiaCode-MediumItalic.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = "CascadiaCode-MediumItalic.ttf"; path = "../assets/fonts/Cascadia_Code/static/CascadiaCode-MediumItalic.ttf"; sourceTree = "<group>"; };
Expand All @@ -82,10 +83,9 @@
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = EnrichedTextInputExample/LaunchScreen.storyboard; sourceTree = "<group>"; };
87375222174145AD85B4DE62 /* CascadiaCode-Medium.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = "CascadiaCode-Medium.ttf"; path = "../assets/fonts/Cascadia_Code/static/CascadiaCode-Medium.ttf"; sourceTree = "<group>"; };
8A425B9B75B9488EA0FDF624 /* README.txt */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = README.txt; path = ../assets/fonts/Cascadia_Code/README.txt; sourceTree = "<group>"; };
8D30641E04B3C92750094BD1 /* Pods-EnrichedTextInputExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-EnrichedTextInputExample.release.xcconfig"; path = "Target Support Files/Pods-EnrichedTextInputExample/Pods-EnrichedTextInputExample.release.xcconfig"; sourceTree = "<group>"; };
8DDAE8E93F2D4651A22D1882 /* Nunito-LightItalic.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = "Nunito-LightItalic.ttf"; path = "../assets/fonts/Nunito/static/Nunito-LightItalic.ttf"; sourceTree = "<group>"; };
95CD629A5570EDEE67260A64 /* libPods-EnrichedTextInputExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-EnrichedTextInputExample.a"; sourceTree = BUILT_PRODUCTS_DIR; };
974D908628154101A0445B89 /* Nunito-Medium.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = "Nunito-Medium.ttf"; path = "../assets/fonts/Nunito/static/Nunito-Medium.ttf"; sourceTree = "<group>"; };
ABB962282C7DB4F364360154 /* Pods-EnrichedTextInputExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-EnrichedTextInputExample.debug.xcconfig"; path = "Target Support Files/Pods-EnrichedTextInputExample/Pods-EnrichedTextInputExample.debug.xcconfig"; sourceTree = "<group>"; };
ABF6C071A9704D7F84EAC642 /* Nunito-Italic-VariableFont_wght.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = "Nunito-Italic-VariableFont_wght.ttf"; path = "../assets/fonts/Nunito/Nunito-Italic-VariableFont_wght.ttf"; sourceTree = "<group>"; };
AFECE93D073F484A93612569 /* Nunito-ExtraLightItalic.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = "Nunito-ExtraLightItalic.ttf"; path = "../assets/fonts/Nunito/static/Nunito-ExtraLightItalic.ttf"; sourceTree = "<group>"; };
B6CB34AFACC240079497790D /* Nunito-Italic.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = "Nunito-Italic.ttf"; path = "../assets/fonts/Nunito/static/Nunito-Italic.ttf"; sourceTree = "<group>"; };
Expand All @@ -104,7 +104,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
9CCBAA226FD195143DDD2884 /* libPods-EnrichedTextInputExample.a in Frameworks */,
4B4950F65A47714993F53BB4 /* libPods-EnrichedTextInputExample.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -127,7 +127,7 @@
isa = PBXGroup;
children = (
ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
6D370084B15B932DA6ABD7D8 /* libPods-EnrichedTextInputExample.a */,
95CD629A5570EDEE67260A64 /* libPods-EnrichedTextInputExample.a */,
);
name = Frameworks;
sourceTree = "<group>";
Expand Down Expand Up @@ -165,8 +165,8 @@
BBD78D7AC51CEA395F1C20DB /* Pods */ = {
isa = PBXGroup;
children = (
ABB962282C7DB4F364360154 /* Pods-EnrichedTextInputExample.debug.xcconfig */,
8D30641E04B3C92750094BD1 /* Pods-EnrichedTextInputExample.release.xcconfig */,
371B368B6AB82CCE5511A1CA /* Pods-EnrichedTextInputExample.debug.xcconfig */,
6918616D8394A3A8000BFE5C /* Pods-EnrichedTextInputExample.release.xcconfig */,
);
path = Pods;
sourceTree = "<group>";
Expand Down Expand Up @@ -222,13 +222,13 @@
isa = PBXNativeTarget;
buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "EnrichedTextInputExample" */;
buildPhases = (
4981A167C0063A82876DD1AB /* [CP] Check Pods Manifest.lock */,
78C433C49BA99727B8F82093 /* [CP] Check Pods Manifest.lock */,
13B07F871A680F5B00A75B9A /* Sources */,
13B07F8C1A680F5B00A75B9A /* Frameworks */,
13B07F8E1A680F5B00A75B9A /* Resources */,
00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
75C9505AFC16ED96EE5E9ED4 /* [CP] Embed Pods Frameworks */,
B600D4E6CF246F817102A773 /* [CP] Copy Pods Resources */,
EDDF48CF048F8E3AEC92FBE1 /* [CP] Embed Pods Frameworks */,
F803EE48F3DE8A3C8C2D3B60 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand Down Expand Up @@ -336,7 +336,7 @@
shellPath = /bin/sh;
shellScript = "set -e\n\nWITH_ENVIRONMENT=\"$REACT_NATIVE_PATH/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"$REACT_NATIVE_PATH/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n";
};
4981A167C0063A82876DD1AB /* [CP] Check Pods Manifest.lock */ = {
78C433C49BA99727B8F82093 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
Expand All @@ -358,7 +358,7 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
75C9505AFC16ED96EE5E9ED4 /* [CP] Embed Pods Frameworks */ = {
EDDF48CF048F8E3AEC92FBE1 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
Expand All @@ -375,7 +375,7 @@
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-EnrichedTextInputExample/Pods-EnrichedTextInputExample-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
B600D4E6CF246F817102A773 /* [CP] Copy Pods Resources */ = {
F803EE48F3DE8A3C8C2D3B60 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
Expand Down Expand Up @@ -408,7 +408,7 @@
/* Begin XCBuildConfiguration section */
13B07F941A680F5B00A75B9A /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = ABB962282C7DB4F364360154 /* Pods-EnrichedTextInputExample.debug.xcconfig */;
baseConfigurationReference = 371B368B6AB82CCE5511A1CA /* Pods-EnrichedTextInputExample.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
Expand Down Expand Up @@ -436,7 +436,7 @@
};
13B07F951A680F5B00A75B9A /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 8D30641E04B3C92750094BD1 /* Pods-EnrichedTextInputExample.release.xcconfig */;
baseConfigurationReference = 6918616D8394A3A8000BFE5C /* Pods-EnrichedTextInputExample.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
Expand Down
2 changes: 1 addition & 1 deletion example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2692,7 +2692,7 @@ SPEC CHECKSUMS:
ReactCommon: d07170f92e0e853091a70b2741b7c43f5dfdea73
ReactNativeEnriched: b11d66700889cd36c9938a825736de1929349b24
SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748
Yoga: 47264cc34431da6b66b3687348be283084924f46
Yoga: 6af5d1e0290903c82b3e0cb6836a5f898c1c4634

PODFILE CHECKSUM: 1b876ae6d1ea0597d954f2089c1213dd3ade28bc

Expand Down
81 changes: 33 additions & 48 deletions ios/EnrichedTextInputView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -1016,6 +1016,16 @@ - (void)anyTextMayHaveBeenModified {
[bqStyle manageBlockquoteColor];
}

// improper headings fix
H1Style *h1Style = stylesDict[@([H1Style getStyleType])];
H2Style *h2Style = stylesDict[@([H2Style getStyleType])];
H3Style *h3Style = stylesDict[@([H3Style getStyleType])];
if(h1Style != nullptr && h2Style != nullptr && h3Style != nullptr) {
[h1Style handleImproperHeadings];
[h2Style handleImproperHeadings];
[h3Style handleImproperHeadings];
}

// placholder management
if(!_placeholderLabel.hidden && textView.textStorage.string.length > 0) {
[self setPlaceholderLabelShown:NO];
Expand Down Expand Up @@ -1102,61 +1112,36 @@ - (void)textViewDidEndEditing:(UITextView *)textView {
- (bool)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text {
recentlyChangedRange = NSMakeRange(range.location, text.length);

BOOL rejectTextChanges = NO;

UnorderedListStyle *uStyle = stylesDict[@([UnorderedListStyle getStyleType])];
if(uStyle != nullptr) {
// removing first line list fix
BOOL removedFirstLineList = [uStyle handleBackspaceInRange:range replacementText:text];

// creating unordered list from "- "
BOOL addedShortcutList = [uStyle tryHandlingListShorcutInRange:range replacementText:text];

// any of these changes make us reject text changes
rejectTextChanges = rejectTextChanges || removedFirstLineList || addedShortcutList;
}

OrderedListStyle *oStyle = stylesDict[@([OrderedListStyle getStyleType])];
if(oStyle != nullptr) {
// removing first line list fix
BOOL removedFirstLineList = [oStyle handleBackspaceInRange:range replacementText:text];

// creating ordered list from "1."
BOOL addedShortcutList = [oStyle tryHandlingListShorcutInRange:range replacementText:text];

// any of these changes make us reject text changes
rejectTextChanges = rejectTextChanges || removedFirstLineList || addedShortcutList;
}

BlockQuoteStyle *bqStyle = stylesDict[@([BlockQuoteStyle getStyleType])];
if(bqStyle != nullptr) {
// removing first line quote fix
BOOL removedFirstLineQuote = [bqStyle handleBackspaceInRange:range replacementText:text];
rejectTextChanges = rejectTextChanges || removedFirstLineQuote;
}

LinkStyle *linkStyle = stylesDict[@([LinkStyle getStyleType])];
if(linkStyle != nullptr) {
// persisting link attributes fix
BOOL fixedLeadingAttributes = [linkStyle handleLeadingLinkReplacement:range replacementText:text];
rejectTextChanges = rejectTextChanges || fixedLeadingAttributes;
}

MentionStyle *mentionStyle = stylesDict[@([MentionStyle getStyleType])];
if(mentionStyle != nullptr) {
// persisting mention attributes fix
BOOL fixedLeadingAttributes = [mentionStyle handleLeadingMentionReplacement:range replacementText:text];
rejectTextChanges = rejectTextChanges || fixedLeadingAttributes;
}

// zero width space removal fix
rejectTextChanges = rejectTextChanges || [ZeroWidthSpaceUtils handleBackspaceInRange:range replacementText:text input:self];

if(rejectTextChanges) {
H1Style *h1Style = stylesDict[@([H1Style getStyleType])];
H2Style *h2Style = stylesDict[@([H2Style getStyleType])];
H3Style *h3Style = stylesDict[@([H3Style getStyleType])];

// some of the changes these checks do could interfere with later checks and cause a crash
// so here I rely on short circuiting evaluation of the logical expression
// either way it's not possible to have two of them come off at the same time
if(
[uStyle handleBackspaceInRange:range replacementText:text] ||
[uStyle tryHandlingListShorcutInRange:range replacementText:text] ||
[oStyle handleBackspaceInRange:range replacementText:text] ||
[oStyle tryHandlingListShorcutInRange:range replacementText:text] ||
[bqStyle handleBackspaceInRange:range replacementText:text] ||
[linkStyle handleLeadingLinkReplacement:range replacementText:text] ||
[mentionStyle handleLeadingMentionReplacement:range replacementText:text] ||
[h1Style handleNewlinesInRange:range replacementText:text] ||
[h2Style handleNewlinesInRange:range replacementText:text] ||
[h3Style handleNewlinesInRange:range replacementText:text] ||
[ZeroWidthSpaceUtils handleBackspaceInRange:range replacementText:text input:self]
) {
[self anyTextMayHaveBeenModified];
return NO;
}
return !rejectTextChanges;

return YES;
}

- (void)textViewDidChangeSelection:(UITextView *)textView {
Expand Down
Loading
Loading