| 1 |
import React from 'react'; |
| 2 |
|
| 3 |
import CodeMirror from 'react-codemirror'; |
| 4 |
require('codemirror/lib/codemirror.css'); |
| 5 |
require('codemirror/mode/xml/xml'); |
| 6 |
|
| 7 |
const HTML = (props) => { |
| 8 |
return ( |
| 9 |
<div className="wpupg-main-container"> |
| 10 |
<h2 className="wpupg-main-container-name">HTML</h2> |
| 11 |
<p> |
| 12 |
Learn more about specific classes you can use to <a href="https://help.bootstrapped.ventures/article/255-classes-you-can-use-in-the-grid-template-editor" target="_blank">align elements or show on hover</a>. You can also make use of <a href="https://help.bootstrapped.ventures/article/254-using-conditions-in-the-grid-template" target="_blank">condition shortcodes</a> to show/hide certain parts of the template based on the grid item's taxonomy or custom field. |
| 13 |
</p> |
| 14 |
<CodeMirror |
| 15 |
className="wpupg-main-container-html" |
| 16 |
value={props.template.html} |
| 17 |
onChange={(value) => props.onChangeValue(value)} |
| 18 |
options={{ |
| 19 |
lineNumbers: true, |
| 20 |
mode: 'xml', |
| 21 |
htmlMode: true, |
| 22 |
}} |
| 23 |
/> |
| 24 |
</div> |
| 25 |
); |
| 26 |
} |
| 27 |
|
| 28 |
export default HTML; |