ssovee-os-web-ui 0.1.71 → 0.1.73

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -55,19 +55,21 @@ export function Example() {
55
55
  }
56
56
  ```
57
57
 
58
- ## JSON editor
58
+ ## Editors
59
59
 
60
- `JsonEditor` is a controlled Monaco editor configured for JSON by default:
60
+ ### CodeEditor
61
+
62
+ `CodeEditor` is a controlled Monaco editor configured for JSON by default:
61
63
 
62
64
  ```tsx
63
65
  import { useState } from "react";
64
- import { JsonEditor } from "ssovee-os-web-ui";
66
+ import { CodeEditor } from "ssovee-os-web-ui";
65
67
 
66
68
  export function SettingsEditor() {
67
69
  const [value, setValue] = useState('{"enabled":true}');
68
70
 
69
71
  return (
70
- <JsonEditor
72
+ <CodeEditor
71
73
  value={value}
72
74
  onChange={setValue}
73
75
  theme="light"
@@ -80,6 +82,30 @@ export function SettingsEditor() {
80
82
 
81
83
  Use `theme="vs-dark"` for a dark editor. The component also accepts Monaco `language`, `height`, and `options` props.
82
84
 
85
+ ### RichEditor
86
+
87
+ `RichEditor` provides WYSIWYG text editing for rich content and HTML output:
88
+
89
+ ```tsx
90
+ import { useState } from "react";
91
+ import { RichEditor } from "ssovee-os-web-ui";
92
+
93
+ export function StoryEditor() {
94
+ const [value, setValue] = useState("<p><strong>Hello</strong> world</p>");
95
+
96
+ return (
97
+ <RichEditor
98
+ value={value}
99
+ onChange={setValue}
100
+ placeholder="Write something rich..."
101
+ height={220}
102
+ />
103
+ );
104
+ }
105
+ ```
106
+
107
+ `RichEditor` supports formatted text output in HTML, along with placeholder, height, and readOnly support.
108
+
83
109
  ## Window components
84
110
 
85
111
  ### Simple window
@@ -204,7 +230,8 @@ The package exports these components and types for external use:
204
230
  - `Button`
205
231
  - `Input`
206
232
  - `TextArea`
207
- - `JsonEditor`
233
+ - `CodeEditor`
234
+ - `RichEditor`
208
235
  - `Select`
209
236
  - `SelectOption`
210
237
  - `Checkbox`