File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
src/components/PlainTextEdit Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,32 @@ import { ViewProps, setViewProps } from "../View/RNView";
7
7
import { RNWidget } from "../config" ;
8
8
import { throwUnsupported } from "../../utils/helpers" ;
9
9
10
+ /**
11
+ * The PlainTextEdit component provides ability to add and manipulate native editable text field widgets. It is based on
12
+ * [NodeGui's QPlainTextEdit](https://docs.nodegui.org/docs/api/generated/classes/qplaintextedit/).
13
+ * ## Example
14
+ * ```javascript
15
+ * import React from "react";
16
+ * import { Renderer, PlainTextEdit, Window } from "@nodegui/react-nodegui";
17
+ *
18
+ * const plainTextRef = React.createRef();
19
+ * const App = () => {
20
+ * React.useEffect(() => {
21
+ * plainTextRef.current.addEventListener("textChanged", () =>
22
+ * console.log(plainTextRef.current.toPlainText())
23
+ * );
24
+ * });
25
+ * return (
26
+ * <Window>
27
+ * <PlainTextEdit ref={plainTextRef} />
28
+ * </Window>
29
+ * );
30
+ * };
31
+ * Renderer.render(<App />);
32
+ *
33
+ * ```
34
+ */
35
+
10
36
export interface PlainTextEditProps extends ViewProps < QPlainTextEditSignals > {
11
37
text ?: string ;
12
38
readOnly ?: boolean ;
You can’t perform that action at this time.
0 commit comments