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
RCTRawTextManager.h
RCTRawTextManager.m
RCTShadowRawText.h
RCTShadowRawText.m
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
RCTText.m iOS: Enable views to be nested within <Text> 2016-05-17 10:43:30 -07:00
RCTTextField.h
RCTTextField.m
RCTTextFieldManager.h
RCTTextFieldManager.m Add support for selectionColor on Android TextInput 2016-02-03 05:49:32 -08:00
RCTTextManager.h
RCTTextManager.m iOS: Enable views to be nested within <Text> 2016-05-17 10:43:30 -07:00
RCTTextView.h
RCTTextView.m Fix autocomplete in rich-text editing mode for CJK text input 2016-04-21 12:10:25 -07:00
RCTTextViewManager.h
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