File tree Expand file tree Collapse file tree 3 files changed +10
-8
lines changed
Expand file tree Collapse file tree 3 files changed +10
-8
lines changed Original file line number Diff line number Diff line change 11.op {
2- height : 300px ;;
2+ height : 300px ;
33}
44
55.CodeMirror {
66 font-family : monospace;
7- font-size : 21pt ;
8- height : 400px ;
9- /* background-color: #44475a; */
7+ font-size : 18pt ;
8+ height : 450px ;
109}
1110
1211.toggler {
Original file line number Diff line number Diff line change 11import React from 'react'
22
3- const Hello = props => < h1 > { props . code } </ h1 > ;
3+ const Hello = props => < h2 > { props . code } </ h2 > ;
44
55export default Hello ;
Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ import 'codemirror/addon/edit/matchbrackets'
99import 'codemirror/addon/edit/closebrackets'
1010import 'codemirror/theme/dracula.css'
1111
12+ import 'codemirror/keymap/sublime'
13+
1214import 'codemirror/addon/hint/xml-hint'
1315import 'codemirror/addon/hint/show-hint'
1416import 'codemirror/addon/hint/show-hint.css'
@@ -21,13 +23,13 @@ export default class XML extends Component {
2123 super ( props ) ;
2224 this . state = {
2325 name : 'CodeMirror' ,
24- code : '🌹💕🐱🚀 <MODE>: </ XML> \n<USE Ctrl +Space> ' ,
26+ code : '<Mode>\n\t< XML/> \n</Mode>\n<AutoComplete>\n\tCtrl +Space\n</AutoComplete>\n<keyBindings>\n\tSublime\n</KeyBindings> ' ,
2527 viewOpToggle : false ,
2628 } ;
2729 }
2830 autoComplete = cm => {
2931 const codeMirror = this . refs [ 'CodeMirror' ] . getCodeMirrorInstance ( ) ;
30- const tags = {
32+ const customTags = {
3133 '!top' : [ 'add' , 'hello' ] ,
3234 '!attrs' : { } ,
3335 'add' : {
@@ -60,7 +62,7 @@ export default class XML extends Component {
6062 } ;
6163
6264 const hintOptions = {
63- schemaInfo : tags ,
65+ schemaInfo : customTags ,
6466 completeSingle : false ,
6567 completeOnSingleClick : true ,
6668 matchInMiddle : true
@@ -94,6 +96,7 @@ export default class XML extends Component {
9496 matchTags : true ,
9597 extraKeys : { "Ctrl-Space" : this . autoComplete } ,
9698 autoCloseBrackets : true ,
99+ keyMap : "sublime"
97100 } ;
98101 return (
99102 < div >
You can’t perform that action at this time.
0 commit comments