@@ -3,78 +3,91 @@ import {
33 Text ,
44 View ,
55 TouchableHighlight ,
6+ ScrollView ,
67} from 'react-native'
78import Styles from './NoteInputSupportStyles'
89
910export default class NoteInputSupport extends React . Component {
1011 render ( ) {
1112 return (
12- < View style = { Styles . inputSupportWrap } >
13- < TouchableHighlight
14- onPress = { ( ) => {
15- this . props . insertMarkdownBetween ( '#' )
16- } }
17- style = { Styles . inputElementsStyle } >
18- < View >
19- < Text style = { Styles . supportMain } > #</ Text >
20- < Text style = { Styles . supportSub } > Head</ Text >
21- </ View >
22- </ TouchableHighlight >
23- < TouchableHighlight
24- onPress = { ( ) => {
25- this . props . insertMarkdownBetween ( '- ' )
26- } }
27- style = { Styles . inputElementsStyle } >
28- < View >
29- < Text style = { Styles . supportMain } > -</ Text >
30- < Text style = { Styles . supportSub } > List</ Text >
31- </ View >
32- </ TouchableHighlight >
33- < TouchableHighlight
34- onPress = { ( ) => {
35- this . props . insertMarkdownBetween ( '```\n' )
36- } }
37- style = { Styles . inputElementsStyle } >
38- < View >
39- < Text style = { Styles . supportMain } > ```</ Text >
40- < Text style = { Styles . supportSub } > Code</ Text >
41- </ View >
42- </ TouchableHighlight >
43- < TouchableHighlight
44- onPress = { ( ) => {
45- this . props . insertMarkdownBetween ( '**' )
46- } }
47- style = { Styles . inputElementsStyle } >
48- < View >
49- < Text style = { Styles . supportMain } > **</ Text >
50- < Text style = { Styles . supportSub } > Bold</ Text >
51- </ View >
52- </ TouchableHighlight >
53- < TouchableHighlight
54- onPress = { ( ) => {
55- this . props . insertMarkdownBetween ( '_' )
56- } }
57- style = { Styles . inputElementsStyle } >
58- < View >
59- < Text style = { Styles . supportMain } > _</ Text >
60- < Text style = { Styles . supportSub } > italic</ Text >
61- </ View >
62- </ TouchableHighlight >
63- < TouchableHighlight
64- onPress = { ( ) => {
65- this . props . insertMarkdownBetween ( '> ' )
66- } }
67- style = { Styles . inputElementsStyle } >
68- < View >
69- < Text style = { Styles . supportMain } > ></ Text >
70- < Text style = { Styles . supportSub } > Quote</ Text >
71- </ View >
72- </ TouchableHighlight >
73- < TouchableHighlight
74- onPress = { this . props . pasteContent . bind ( this ) }
75- style = { Styles . inputElementsStyle } >
76- < Text style = { Styles . pasteButton } > Paste</ Text >
77- </ TouchableHighlight >
13+ < View style = { Styles . inputSupportWrap } >
14+ < ScrollView horizontal = { true } keyboardShouldPersistTaps = 'always' >
15+ < TouchableHighlight
16+ onPress = { ( ) => {
17+ this . props . insertMarkdownBetween ( '#' )
18+ } }
19+ style = { Styles . inputElementsStyle } >
20+ < View >
21+ < Text style = { Styles . supportMain } > #</ Text >
22+ < Text style = { Styles . supportSub } > Head</ Text >
23+ </ View >
24+ </ TouchableHighlight >
25+ < TouchableHighlight
26+ onPress = { ( ) => {
27+ this . props . insertMarkdownBetween ( '- ' )
28+ } }
29+ style = { Styles . inputElementsStyle } >
30+ < View >
31+ < Text style = { Styles . supportMain } > -</ Text >
32+ < Text style = { Styles . supportSub } > List</ Text >
33+ </ View >
34+ </ TouchableHighlight >
35+ < TouchableHighlight
36+ onPress = { ( ) => {
37+ this . props . insertMarkdownBetween ( '```\n' )
38+ } }
39+ style = { Styles . inputElementsStyle } >
40+ < View >
41+ < Text style = { Styles . supportMain } > ```</ Text >
42+ < Text style = { Styles . supportSub } > Code</ Text >
43+ </ View >
44+ </ TouchableHighlight >
45+ < TouchableHighlight
46+ onPress = { ( ) => {
47+ this . props . insertMarkdownBetween ( '**' )
48+ } }
49+ style = { Styles . inputElementsStyle } >
50+ < View >
51+ < Text style = { Styles . supportMain } > **</ Text >
52+ < Text style = { Styles . supportSub } > Bold</ Text >
53+ </ View >
54+ </ TouchableHighlight >
55+ < TouchableHighlight
56+ onPress = { ( ) => {
57+ this . props . insertMarkdownBetween ( '_' )
58+ } }
59+ style = { Styles . inputElementsStyle } >
60+ < View >
61+ < Text style = { Styles . supportMain } > _</ Text >
62+ < Text style = { Styles . supportSub } > italic</ Text >
63+ </ View >
64+ </ TouchableHighlight >
65+ < TouchableHighlight
66+ onPress = { ( ) => {
67+ this . props . insertMarkdownBetween ( '> ' )
68+ } }
69+ style = { Styles . inputElementsStyle } >
70+ < View >
71+ < Text style = { Styles . supportMain } > ></ Text >
72+ < Text style = { Styles . supportSub } > Quote</ Text >
73+ </ View >
74+ </ TouchableHighlight >
75+ < TouchableHighlight
76+ onPress = { ( ) => {
77+ this . props . insertMarkdownBetween ( '- [ ] ' )
78+ } }
79+ style = { Styles . inputElementsStyle } >
80+ < View >
81+ < Text style = { Styles . supportMain } > - [ ]</ Text >
82+ < Text style = { Styles . supportSub } > TaskList</ Text >
83+ </ View >
84+ </ TouchableHighlight >
85+ < TouchableHighlight
86+ onPress = { this . props . pasteContent . bind ( this ) }
87+ style = { Styles . inputElementsStyle } >
88+ < Text style = { Styles . pasteButton } > Paste</ Text >
89+ </ TouchableHighlight >
90+ </ ScrollView >
7891 </ View >
7992 )
8093 }
0 commit comments