@luscii-healthtech/web-ui 14.0.0 → 15.0.0

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.
@@ -4,7 +4,43 @@ import "react-quill/dist/quill.snow.css";
4
4
  import "./TextEditor.scss";
5
5
  type TextEditorProps = Pick<ReactQuillProps, "defaultValue" | "placeholder"> & {
6
6
  onValueChange: ReactQuillProps["onChange"];
7
+ /**
8
+ * Which formats to allow in the editor, like "bold" and "italic".
9
+ *
10
+ * This is different from the buttons that are shown in the toolbar,
11
+ * because a user could paste in text that has bold formatting without
12
+ * having a bold button in the toolbar. This prop determines if that is
13
+ * allowed or not.
14
+ *
15
+ * @default
16
+ *
17
+ * ["bold", "italic", "underline", "strike", "list", "link"]
18
+ *
19
+ * @example
20
+ *
21
+ * ["bold", "italic, "color", "code"]
22
+ *
23
+ * See: https://github.com/zenoamaro/react-quill#custom-formats
24
+ */
7
25
  formats: TextEditorFormat[];
26
+ /**
27
+ * Which buttons to show in the toolbar, like "bold" and "italic".
28
+ *
29
+ * @default
30
+ * [
31
+ * ["bold", "italic", "underline", "strike"],
32
+ * [{ list: "ordered" }, { list: "bullet" }],
33
+ * ["link"],
34
+ * ]
35
+ *
36
+ * @example
37
+ *
38
+ * [
39
+ * ["bold", "italic", "underline", "strike"],
40
+ * ["link", "video"],
41
+ * ]
42
+ * See: https://github.com/zenoamaro/react-quill#custom-toolbar
43
+ */
8
44
  toolbar: TextEditorToolbarOption[][];
9
45
  };
10
46
  type TextEditorToolbarOption = "bold" | "italic" | "underline" | "strike" | "link" | "video" | {
@@ -4848,7 +4848,7 @@ styleInject(css_248z);
4848
4848
  const TextEditor = ({ defaultValue, onValueChange, placeholder, toolbar = [
4849
4849
  ["bold", "italic", "underline", "strike"],
4850
4850
  [{ list: "ordered" }, { list: "bullet" }],
4851
- ["link", "video"]
4851
+ ["link"]
4852
4852
  ], formats = ["bold", "italic", "underline", "strike", "list", "link"] }) => {
4853
4853
  const quillRef = React.useRef(null);
4854
4854
  React.useEffect(() => {