Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RNMobile] Fix text formatting mode lost after backspace is used #37676

Merged
merged 7 commits into from
Jan 5, 2022
Merged
Show file tree
Hide file tree
Changes from 2 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
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ class RCTAztecView: Aztec.TextView {
storage.htmlConverter.characterToReplaceLastEmptyLine = Character(.zeroWidthSpace)
storage.htmlConverter.shouldCollapseSpaces = false
shouldNotifyOfNonUserChanges = false
// Typing attributes are controlled by RichText component so we have to prevent Aztec to recalculate them when deleting backward.
shouldRecalculateTypingAttributesOnDeleteBackward = false
disableLinkTapRecognizer()
preBackgroundColor = .clear
}
Expand Down
4 changes: 4 additions & 0 deletions packages/react-native-editor/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ platform :ios, '13.0'
require_relative '../../../node_modules/react-native/scripts/react_native_pods'
require_relative '../../../node_modules/@react-native-community/cli-platform-ios/native_modules'

# Changes Aztec reference to last commit from https://github.com/wordpress-mobile/AztecEditor-iOS/pull/1346 PR.
# ONLY FOR TESTING, IT SHOULD BE DELETED ONCE THE AZTEC PR IS MERGED!
pod 'WordPress-Aztec-iOS', :git => 'https://github.com/wordpress-mobile/AztecEditor-iOS.git', :commit => 'd68c76ec8f01490c741077dccefc17b17ce19f2d'

Copy link
Contributor Author

@fluiddot fluiddot Dec 31, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated the Aztec-iOS reference so it points to the PR (wordpress-mobile/AztecEditor-iOS#134) where the shouldRecalculateTypingAttributesOnDeleteBackward variable was added. Once that PR is merged, we should remove the changes made to Podfile and Podfile.lock files.

target 'GutenbergDemo' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
Expand Down
14 changes: 11 additions & 3 deletions packages/react-native-editor/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -355,12 +355,12 @@ DEPENDENCIES:
- RNScreens (from `../../../node_modules/react-native-screens`)
- RNSVG (from `../../../node_modules/react-native-svg`)
- RNTAztecView (from `../../react-native-aztec`)
- WordPress-Aztec-iOS (from `https://github.com/wordpress-mobile/AztecEditor-iOS.git`, commit `d68c76ec8f01490c741077dccefc17b17ce19f2d`)
- Yoga (from `../../../node_modules/react-native/ReactCommon/yoga`)

SPEC REPOS:
trunk:
- boost-for-react-native
- WordPress-Aztec-iOS

EXTERNAL SOURCES:
BVLinearGradient:
Expand Down Expand Up @@ -449,15 +449,23 @@ EXTERNAL SOURCES:
:path: "../../../node_modules/react-native-svg"
RNTAztecView:
:path: "../../react-native-aztec"
WordPress-Aztec-iOS:
:commit: d68c76ec8f01490c741077dccefc17b17ce19f2d
:git: https://github.com/wordpress-mobile/AztecEditor-iOS.git
Yoga:
:path: "../../../node_modules/react-native/ReactCommon/yoga"

CHECKOUT OPTIONS:
WordPress-Aztec-iOS:
:commit: d68c76ec8f01490c741077dccefc17b17ce19f2d
:git: https://github.com/wordpress-mobile/AztecEditor-iOS.git

SPEC CHECKSUMS:
boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
BVLinearGradient: 1e5474c982efcfcaed47f368a61431bb38a4faf8
DoubleConversion: cf9b38bf0b2d048436d9a82ad2abe1404f11e7de
FBLazyVector: 49cbe4b43e445b06bf29199b6ad2057649e4c8f5
FBReactNativeSpec: 483e4a3c2982c1ce57d08e90fea6be852dd5f691
FBReactNativeSpec: ebf5d0d5406a50fed4bd7e93460435dfddcab39a
glog: 73c2498ac6884b13ede40eda8228cb1eee9d9d62
Gutenberg: c60e4e43b9cba783fd2e65aad912d1b6cf2f0098
RCT-Folly: ec7a233ccc97cc556cf7237f0db1ff65b986f27c
Expand Down Expand Up @@ -500,6 +508,6 @@ SPEC CHECKSUMS:
WordPress-Aztec-iOS: 129276e7d1391acb08157641a54394668bb0d7f8
Yoga: 8c8436d4171c87504c648ae23b1d81242bdf3bbf

PODFILE CHECKSUM: db5f67a29ecba75541dad181ff59246b6da2fb09
PODFILE CHECKSUM: c44f53e59fbb9a57271609645edc63f61a84cd74

COCOAPODS: 1.10.1