Skip to content

Commit

Permalink
Merge pull request #86 from joehoyle/add-link-to-formatter
Browse files Browse the repository at this point in the history
Add linking to WYSIWYG
  • Loading branch information
joehoyle authored Jan 14, 2020
2 parents 3b646b2 + 7ae0c7d commit 28549d1
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 28 deletions.
50 changes: 27 additions & 23 deletions components/Posts/EditContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
TextInput,
View,
} from 'react-native';
import { Editor } from 'react-native-tinymce';
import { Editor, Provider, Tools } from 'react-native-tinymce';
import { connect } from 'react-redux';

import Icon from '../Icon';
Expand Down Expand Up @@ -133,29 +133,33 @@ class EditContent extends Component {
const { post } = this.props;

return (
<SafeAreaView style={ { flex: 1 } }>
<StatusBar
animated={ false }
barStyle="dark-content"
hidden={ false }
/>
<TextInput
autoFocus={ ! post.title }
placeholder="Enter title…"
style={ styles.title }
value={ post.title ? post.title.raw : null }
onChangeText={ value => this.props.onChangePropertyValue( 'title', value ) }
onSubmitEditing={ () => {} }
/>
<View style={ { flex: 1 } }>
<Editor
ref={ ref => this.editor = ref }
contentCss={ CONTENT_CSS }
placeholder="Start writing…"
value={ post.content ? post.content.raw : null }
<Provider>
<SafeAreaView style={ { flex: 1 } }>
<StatusBar
animated={ false }
barStyle="dark-content"
hidden={ false }
/>
</View>
</SafeAreaView>
<TextInput
autoFocus={ ! post.title }
placeholder="Enter title…"
style={ styles.title }
value={ post.title ? post.title.raw : null }
onChangeText={ value => this.props.onChangePropertyValue( 'title', value ) }
onSubmitEditing={ () => {} }
/>
<View style={ { flex: 1 } }>
<Editor
ref={ ref => this.editor = ref }
contentCss={ CONTENT_CSS }
placeholder="Start writing…"
value={ post.content ? post.content.raw : null }
/>
</View>

<Tools />
</SafeAreaView>
</Provider>
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"react-native-reanimated": "~1.4.0",
"react-native-safe-area-context": "0.6.0",
"react-native-screens": "2.0.0-alpha.12",
"react-native-tinymce": "^0.0.6",
"react-native-tinymce": "^0.1.2",
"react-native-webview": "7.4.3",
"react-redux": "6",
"react-router-native": "5",
Expand Down
14 changes: 10 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1203,6 +1203,11 @@
"@react-navigation/routers" "^5.0.0-alpha.18"
color "^3.1.2"

"@rmccue/sfsymbols@^0.0.2":
version "0.0.2"
resolved "https://registry.yarnpkg.com/@rmccue/sfsymbols/-/sfsymbols-0.0.2.tgz#fb276aa57f3ba99f60010524574574145d425351"
integrity sha512-IOATlJatTEAvp68gLBfNuWSvkOf7dD83h9SLJ665cs15r/cFOIzdzCsZW6VPtiawyZ4mSTKohK9j1l+YX2cRFg==

"@types/babel__core@^7.1.0":
version "7.1.3"
resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.3.tgz#e441ea7df63cd080dfcd02ab199e6d16a735fc30"
Expand Down Expand Up @@ -6130,11 +6135,12 @@ [email protected]:
dependencies:
debounce "^1.2.0"

react-native-tinymce@^0.0.6:
version "0.0.6"
resolved "https://registry.yarnpkg.com/react-native-tinymce/-/react-native-tinymce-0.0.6.tgz#6b17d2bb7e456a471971518fac2729021096bef9"
integrity sha512-DchltdSySruWHYLQkEbXapp1wY5bgwi4xIcFzZpErAgWrWe65Tz3utWPyXnL6/ligi28BVgNnCgTWJdk5Tjdkw==
react-native-tinymce@^0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/react-native-tinymce/-/react-native-tinymce-0.1.2.tgz#0642951384bca607211f9c6423dfa416b5cf36e3"
integrity sha512-d76eZlh/MwyZTuLj/dyRqM2zD1S/AUl+GBxNRbcBE89YhRYGA+8khk199KGjJXxMzNpmXNSz8mRhA2xE4bTW+Q==
dependencies:
"@rmccue/sfsymbols" "^0.0.2"
react-native-keyboard-accessory "^0.1.10"
tinymce "^5.1.5"

Expand Down

0 comments on commit 28549d1

Please sign in to comment.