React UI Components
Show Demo List
|
ReactJS TextArea demo. To switch an editor to a right-to-left representation, just enable a single property - "rtl". When this property is on, text flows from right to left in an editor and the editor itself is mirrored (the layout of its UI elements is reversed).
|
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title id='Description'>
ReactJS TextArea demo. To switch an editor to a right-to-left representation, just enable a single property - "rtl". When this property is on, text flows from right to left in an editor and the editor itself is mirrored (the layout of its UI elements is reversed).
</title>
<meta name="description" content="This React TextArea demo showcases how to use the TextArea in Right To Left mode"/>
<link rel="stylesheet" href="../jqwidgets/styles/jqx.base.css" type="text/css" />
<script type="text/javascript" src="../jqwidgets/jqxcore.js"></script>
<script type="text/javascript" src="../jqwidgets/jqxbuttons.js"></script>
<script type="text/javascript" src="../jqwidgets/jqxscrollbar.js"></script>
<script type="text/javascript" src="../jqwidgets/jqxtextarea.js"></script>
<script type="text/javascript" src="../scripts/demos.js"></script>
</head>
<body>
<div class="example-description" style="margin-bottom:3em">
ReactJS TextArea demo. To switch an editor to a right-to-left representation, just enable a single property - "rtl". When this property is on, text flows from right to left in an editor and the editor itself is mirrored (the layout of its UI elements is reversed).
</div>
<div id="app"></div>
<script src="../build/textarea_righttoleftlayout.bundle.js"></script>
</body>
</html>
import React from 'react';import ReactDOM from 'react-dom';import JqxTextArea from '../../../jqwidgets-react/react_jqxtextarea.js';class App extends React.Component {
componentDidMount() {
let text = 'jQWidgets is a comprehensive and innovative widget library built on top of the jQuery JavaScript Library. It empowers developers to deliver professional, cross-browser compatible web applications, while significantly minimizing their development time. jQWidgets contains more than 60 UI widgets and is one of the fastest growing JavaScript UI frameworks on the Web.';
this.refs.myTextArea.val(text);
}
render () {
return (
<JqxTextArea ref='myTextArea'
width={300} height={100} rtl={true}
/>
)
}
}
ReactDOM.render(<App />, document.getElementById('app'));