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
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,17 @@ function BaseHTMLEngineProvider(props) {
mixedUAStyles: {...styles.textLabelSupporting},
}),
'next-steps-email': defaultHTMLElementModels.span.extend({tagName: 'next-steps-email'}),
video: defaultHTMLElementModels.div.extend({
tagName: 'video',
mixedUAStyles: {whiteSpace: 'pre'},
}),
}),
[styles.colorMuted, styles.formError, styles.mb0, styles.textLabelSupporting],
);

// We need to memoize this prop to make it referentially stable.
const defaultTextProps = useMemo(() => ({selectable: props.textSelectable, allowFontScaling: false, textBreakStrategy: 'simple'}), [props.textSelectable]);
const defaultViewProps = {style: [styles.alignItemsStart, styles.userSelectText]};

return (
<TRenderEngineProvider
customHTMLElementModels={customHTMLElementModels}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function AnchorRenderer(props) {
const isAttachment = Boolean(htmlAttribs[CONST.ATTACHMENT_SOURCE_ATTRIBUTE]);
const displayName = lodashGet(props.tnode, 'domNode.children[0].data', '');
const parentStyle = lodashGet(props.tnode, 'parent.styles.nativeTextRet', {});
const attrHref = htmlAttribs.href || '';
const attrHref = htmlAttribs.href || htmlAttribs[CONST.ATTACHMENT_SOURCE_ATTRIBUTE] || '';
const internalNewExpensifyPath = Link.getInternalNewExpensifyPath(attrHref);
const internalExpensifyPath = Link.getInternalExpensifyPath(attrHref);

Expand Down
1 change: 1 addition & 0 deletions src/components/HTMLEngineProvider/HTMLRenderers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export default {
a: AnchorRenderer,
code: CodeRenderer,
img: ImageRenderer,
video: AnchorRenderer, // temporary until we have a video player component

// Custom tag renderers
edited: EditedRenderer,
Expand Down