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 SummaryArea from './summaryArea/view/summaryAreaView';
import TagArea from './tagArea/view/tagAreaView'; import TagArea from './tagArea/view/tagAreaView';
import TextArea from './textArea/view/textAreaView';
import TitleArea from './titleArea/view/titleAreaView'; 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', fontFamily: '$editorFont',
textAlignVertical: 'top', textAlignVertical: 'top',
paddingVertical: 0, paddingVertical: 0,
backgroundColor: '$primaryBackgroundColor',
}, },
}); });

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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