react-native/Libraries/Text
Adam Comella fe5c0d2d06 iOS: Enable views to be nested within <Text>
Summary:
Previously, only Text and Image could be nested within Text. Now, any
view can be nested within Text. One restriction of this feature is
that developers must give inline views a width and a height via
the style prop.

Previously, inline Images were supported by using iOS's built-in support
for rendering images with an NSAttributedString via NSTextAttachment.
However, NSAttributedString doesn't support rendering arbitrary views.

This change adds support for nesting views within Text by creating one
NSTextAttachment per inline view. The NSTextAttachments act as placeholders.
They are set to be the size of the corresponding view. After the text is
laid out, we query the text system to find out where it has positioned each
NSTextAttachment. We then position the views to be at those locations.

This commit also contains a change in `RCTShadowText.m`
`_setParagraphStyleOnAttributedString:heightOfTallestSubview:`. It now only sets
`lineHeight`, `textAlign`, and `writingDirection` when they've actua
Closes https://github.com/facebook/react-native/pull/7304

Differential Revision: D3269333

Pulled By: nicklockwood

fbshipit-source-id: 2b59f1c5445a4012f9c29df9f10f5010060ea517
2016-05-17 10:43:30 -07:00
..
RCTText.xcodeproj Text highlighting on iOS 2015-07-24 08:41:58 -08:00
RCTRawTextManager.h [ReactNative] Expanded license on obj-c files 2015-03-23 13:18:29 -08:00
RCTRawTextManager.m Convert alloc/init to new to please linter 2015-08-17 08:46:00 -07:00
RCTShadowRawText.h [ReactNative] Expanded license on obj-c files 2015-03-23 13:18:29 -08:00
RCTShadowRawText.m Fix Groups text input 2015-11-04 04:09:27 -08:00
RCTShadowText.h backout (and remove) props.lineBreakMode from Text 2016-03-17 11:48:24 -07:00
RCTShadowText.m iOS: Enable views to be nested within <Text> 2016-05-17 10:43:30 -07:00
RCTText.h Fixed crash in RCTText due to NSTextContainer/NSLayoutManager being accessed concurrently from main and shadow queues 2015-05-26 18:52:46 -08:00
RCTText.m iOS: Enable views to be nested within <Text> 2016-05-17 10:43:30 -07:00
RCTTextField.h Open sourced the onSelectionChange event 2015-11-14 09:44:30 -08:00
RCTTextField.m Maintain cursor position when TextInput value is changed programmatically 2015-12-17 10:23:26 -08:00
RCTTextFieldManager.h Migrated RCTText into FBReactKit 2015-07-08 07:13:00 -08:00
RCTTextFieldManager.m Add support for selectionColor on Android TextInput 2016-02-03 05:49:32 -08:00
RCTTextManager.h Add support for multiline TextInput via UITextView 2015-04-29 01:33:58 -08:00
RCTTextManager.m iOS: Enable views to be nested within <Text> 2016-05-17 10:43:30 -07:00
RCTTextView.h Added blurOnSubmit support to multine TextInput (aka RCTTextView) 2015-12-02 08:16:27 -08:00
RCTTextView.m Fix autocomplete in rich-text editing mode for CJK text input 2016-04-21 12:10:25 -07:00
RCTTextViewManager.h Add support for multiline TextInput via UITextView 2015-04-29 01:33:58 -08:00
RCTTextViewManager.m Add support for `textAlign` on iOS multiline text input 2016-02-07 12:38:36 -08:00
Text.js Implement Text onLongPress 2016-04-23 18:14:20 -07:00
TextStylePropTypes.js Fallback for textAlign: justify 2016-04-24 11:29:23 -07:00
TextUpdateTest.js Fix up this pattern var React = require('react-native'); 2016-04-08 20:37:22 -07:00