From 2c48aeabe5f6069aeddde7cf7d380f8974d58a5b Mon Sep 17 00:00:00 2001 From: u-e Date: Tue, 15 Jan 2019 13:19:41 +0300 Subject: [PATCH] updated for image and container --- .../markdownEditor/view/markdownEditorStyles.js | 7 +++++-- .../markdownEditor/view/markdownEditorView.js | 14 ++++++-------- src/utils/markdownToHtml.js | 2 +- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/components/markdownEditor/view/markdownEditorStyles.js b/src/components/markdownEditor/view/markdownEditorStyles.js index 991e9cc3c..3adcb3414 100644 --- a/src/components/markdownEditor/view/markdownEditorStyles.js +++ b/src/components/markdownEditor/view/markdownEditorStyles.js @@ -9,14 +9,17 @@ export default EStyleSheet.create({ }, textWrapper: { flex: 1, - flexDirection: 'column', fontSize: 12, - marginVertical: 16, + paddingVertical: 16, paddingHorizontal: 16, color: '$primaryBlack', fontFamily: '$editorFont', textAlignVertical: 'top', }, + previewContainer: { + flex: 1, + marginHorizontal: 16, + }, inlinePadding: { padding: 8, }, diff --git a/src/components/markdownEditor/view/markdownEditorView.js b/src/components/markdownEditor/view/markdownEditorView.js index 2b44ad090..205f26474 100644 --- a/src/components/markdownEditor/view/markdownEditorView.js +++ b/src/components/markdownEditor/view/markdownEditorView.js @@ -1,19 +1,19 @@ import React, { Component } from 'react'; import { - View, KeyboardAvoidingView, ScrollView, FlatList, Text, Platform, + View, KeyboardAvoidingView, FlatList, Text, Platform, } from 'react-native'; import ActionSheet from 'react-native-actionsheet'; // Utils import { markDown2Html } from '../../../utils/markdownToHtml'; +import applyImageLink from './formats/applyWebLinkFormat'; +import Formats from './formats/formats'; // Components import { IconButton } from '../../iconButton'; +import { PostBody } from '../../postElements'; import { StickyBar } from '../../basicUIElements'; import { TextInput } from '../../textInput'; -import applyImageLink from './formats/applyWebLinkFormat'; -import Formats from './formats/formats'; -import { PostBody } from '../../postElements'; // Styles import styles from './markdownEditorStyles'; @@ -98,10 +98,8 @@ export default class MarkdownEditorView extends Component { const { text } = this.state; return ( - - - {text ? : ...} - + + {text ? : ...} ); }; diff --git a/src/utils/markdownToHtml.js b/src/utils/markdownToHtml.js index 75e651651..be17f6b45 100644 --- a/src/utils/markdownToHtml.js +++ b/src/utils/markdownToHtml.js @@ -152,7 +152,7 @@ const changeMarkdownImage = input => input.replace(markdownImageRegex, (link) => return link; }); -const centerStyling = input => input.replace(centerRegex, () => '
'); +const centerStyling = input => input.replace(centerRegex, () => '
'); const steemitUrlHandle = input => input.replace(postRegex, (link) => { const postMatch = link.match(postRegex);