Merge pull request #1295 from esteemapp/bugfix/editor-gesture

fixed editor colors
This commit is contained in:
Mustafa Buyukcelebi 2019-11-14 21:57:45 +03:00 committed by GitHub
commit e132d7bc21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 15 additions and 46 deletions

View File

@ -1,6 +1,5 @@
import SummaryArea from './summaryArea/view/summaryAreaView';
import TagArea from './tagArea/view/tagAreaView';
import TextArea from './textArea/view/textAreaView';
import TitleArea from './titleArea/view/titleAreaView';
export { SummaryArea, TagArea, TextArea, TitleArea };
export { SummaryArea, TagArea, TitleArea };

View File

@ -1,8 +0,0 @@
import EStyleSheet from 'react-native-extended-stylesheet';
export default EStyleSheet.create({
container: {
flex: 1,
marginTop: 16,
},
});

View File

@ -1,25 +0,0 @@
import React, { PureComponent } from 'react';
// Constants
// Components
import { MarkdownEditor } from '../../../markdownEditor';
export default class TextAreaView extends PureComponent {
/* Props
* ------------------------------------------------
* @prop { type } name - Description....
*/
constructor(props) {
super(props);
this.state = {};
}
// Component Life Cycles
// Component Functions
render() {
return <MarkdownEditor {...this.props} />;
}
}

View File

@ -8,5 +8,6 @@ export default EStyleSheet.create({
fontFamily: '$editorFont',
textAlignVertical: 'top',
paddingVertical: 0,
backgroundColor: '$primaryBackgroundColor',
},
});

View File

@ -14,6 +14,7 @@ export default EStyleSheet.create({
paddingBottom: 0, // On android side, textinput has default padding
paddingHorizontal: 16,
color: '$primaryBlack',
backgroundColor: '$primaryBackgroundColor',
fontFamily: '$editorFont',
textAlignVertical: 'top',
},

View File

@ -1,7 +1,6 @@
import EStyleSheet from 'react-native-extended-stylesheet';
export default EStyleSheet.create({
view: {},
codeBlock: {
fontFamily: 'Courier',
fontWeight: '500',

View File

@ -15,6 +15,5 @@ export default EStyleSheet.create({
input: {
flex: 1,
minHeight: 50,
backgroundColor: '$primaryWhiteLightBackground',
},
});

View File

@ -1,9 +1,9 @@
import React from 'react';
import 'react-native-gesture-handler';
import { Provider, connect } from 'react-redux';
import { PersistGate } from 'redux-persist/integration/react';
import { IntlProvider } from 'react-intl';
import { useScreens } from 'react-native-screens';
import { flattenMessages } from './utils/flattenMessages';
import messages from './config/locales';

View File

@ -96,9 +96,9 @@ class EditorContainer extends Component {
this.setState({
isEdit,
draftPost: {
title: post.title,
body: post.markdownBody,
tags: post.json_metadata.tags,
title: get(post, 'title', ''),
body: get(post, 'markdownBody', ''),
tags: get(post, 'json_metadata.tags', []),
},
});
}
@ -129,9 +129,9 @@ class EditorContainer extends Component {
if (result) {
this.setState({
draftPost: {
body: result.body,
title: result.title,
tags: result.tags.split(','),
body: get(result, 'body', ''),
title: get(result, 'title', ''),
tags: get(result, 'tags', '').split(','),
},
});
}

View File

@ -14,6 +14,7 @@ import {
TextArea,
SummaryArea,
PostForm,
MarkdownEditor,
} from '../../../components';
// Styles
@ -73,7 +74,9 @@ class EditorScreen extends Component {
isRemoveTag: true,
});
if (initialEditor) initialEditor();
if (initialEditor) {
initialEditor();
}
};
_handleOnPressPreviewButton = () => {
@ -229,7 +232,7 @@ class EditorScreen extends Component {
intl={intl}
/>
)}
<TextArea
<MarkdownEditor
componentID="body"
draftBody={fields && fields.body}
handleOnTextChange={this._setWordsCount}