mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-29 16:44:27 +03:00
removed missing lines
This commit is contained in:
parent
68a2cee521
commit
80ac0e3b4e
@ -2,7 +2,6 @@ import React, { Component } from 'react';
|
|||||||
import {
|
import {
|
||||||
View, KeyboardAvoidingView, ScrollView, FlatList, Text, Platform,
|
View, KeyboardAvoidingView, ScrollView, FlatList, Text, Platform,
|
||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
import Markdown, { getUniqueID } from 'react-native-markdown-renderer';
|
|
||||||
import ActionSheet from 'react-native-actionsheet';
|
import ActionSheet from 'react-native-actionsheet';
|
||||||
|
|
||||||
// Utils
|
// Utils
|
||||||
@ -15,9 +14,9 @@ import { TextInput } from '../../textInput';
|
|||||||
import applyImageLink from './formats/applyWebLinkFormat';
|
import applyImageLink from './formats/applyWebLinkFormat';
|
||||||
import Formats from './formats/formats';
|
import Formats from './formats/formats';
|
||||||
import { PostBody } from '../../postElements';
|
import { PostBody } from '../../postElements';
|
||||||
|
|
||||||
// Styles
|
// Styles
|
||||||
import styles from './markdownEditorStyles';
|
import styles from './markdownEditorStyles';
|
||||||
import markdownStyle from './markdownPreviewStyles';
|
|
||||||
|
|
||||||
export default class MarkdownEditorView extends Component {
|
export default class MarkdownEditorView extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
@ -97,26 +96,11 @@ export default class MarkdownEditorView extends Component {
|
|||||||
|
|
||||||
_renderPreview = () => {
|
_renderPreview = () => {
|
||||||
const { text } = this.state;
|
const { text } = this.state;
|
||||||
const rules = {
|
|
||||||
heading1: (node, children, parent, styles) => (
|
|
||||||
<Text key={getUniqueID()} style={styles.heading1}>
|
|
||||||
{children}
|
|
||||||
</Text>
|
|
||||||
),
|
|
||||||
heading2: (node, children, parent, styles) => (
|
|
||||||
<Text key={getUniqueID()} style={styles.heading2}>
|
|
||||||
{children}
|
|
||||||
</Text>
|
|
||||||
),
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={styles.textWrapper}>
|
<View style={styles.textWrapper}>
|
||||||
<ScrollView removeClippedSubviews>
|
<ScrollView removeClippedSubviews>
|
||||||
{/* <Markdown rules={rules} style={markdownStyle}>
|
{text ? <PostBody body={markDown2Html(text)} /> : <Text>...</Text>}
|
||||||
{text === '' ? '...' : text}
|
|
||||||
</Markdown> */}
|
|
||||||
<PostBody body={markDown2Html(text)} />
|
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user