neo-md 1.0.2 → 1.1.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.
package/README.md CHANGED
@@ -7,6 +7,7 @@ A modern, highly-configurable, and highly-secure React markdown editor component
7
7
  ## Features
8
8
 
9
9
  - **XSS Prevention** - Raw HTML rendering in the editor pane is secured via `isomorphic-dompurify`.
10
+ - **Syntax Highlighting** - Fully customizable color themes for the editor pane with support for headings, bold, italic, links, code blocks, lists, and more.
10
11
  - **Controlled & Uncontrolled Support** - Plug it into external state naturally like a standard input element, or let it manage its own.
11
12
  - **Deep Customizability** - Apply your own `className` structures mapping to the editor pane, preview pane, and toolbar.
12
13
  - **Ref Forwarding** - Programmatically trigger focus or grab values using `useImperativeHandle` and `forwardRef`.
@@ -119,6 +120,7 @@ The `MarkdownEditor` component accepts the following props:
119
120
  | `readOnly` | `boolean` | `false` | Disables text input while retaining interactions. |
120
121
  | `maxLength` | `number` | `undefined` | Hard cap on textarea character length. |
121
122
  | `components` | `Components` | `{}` | Complete `react-markdown` DOM rendering overrides. |
123
+ | `syntaxColors` | `SyntaxHighlightColors` | `defaultColors` | Custom color theme for syntax highlighting. |
122
124
 
123
125
  ## Exposed Methods (`MarkdownEditorRef`)
124
126
 
@@ -129,13 +131,7 @@ Via `forwardRef`, parents can trigger the following imperatives on the editor:
129
131
 
130
132
  ## Contributing
131
133
 
132
- Contributions are welcome. Please feel free to submit a Pull Request.
133
-
134
- 1. Fork the project
135
- 2. Create your feature branch (`git checkout -b feature/Enhancement`)
136
- 3. Commit your changes (`git commit -m 'Add some Enhancement'`)
137
- 4. Push to the branch (`git push origin feature/Enhancement`)
138
- 5. Open a Pull Request
134
+ Contributions are welcome! Please see our [Contributing Guide](CONTRIBUTING.md) for detailed information on how to get started, development workflow, and coding guidelines.
139
135
 
140
136
  ## License
141
137
 
package/dist/index.d.ts CHANGED
@@ -21,6 +21,7 @@ export declare interface MarkdownEditorProps {
21
21
  readOnly?: boolean;
22
22
  maxLength?: number;
23
23
  components?: Components;
24
+ syntaxColors?: SyntaxHighlightColors;
24
25
  }
25
26
 
26
27
  export declare interface MarkdownEditorRef {
@@ -28,4 +29,33 @@ export declare interface MarkdownEditorRef {
28
29
  getValue: () => string;
29
30
  }
30
31
 
32
+ export declare interface SyntaxHighlightColors {
33
+ heading?: string;
34
+ headingText?: string;
35
+ bold?: string;
36
+ boldText?: string;
37
+ italic?: string;
38
+ italicText?: string;
39
+ strikethrough?: string;
40
+ strikethroughText?: string;
41
+ inlineCode?: string;
42
+ inlineCodeText?: string;
43
+ inlineCodeBg?: string;
44
+ link?: string;
45
+ linkText?: string;
46
+ linkUrl?: string;
47
+ image?: string;
48
+ imageAlt?: string;
49
+ imagePath?: string;
50
+ listBullet?: string;
51
+ listText?: string;
52
+ orderedList?: string;
53
+ blockquote?: string;
54
+ blockquoteText?: string;
55
+ codeBlock?: string;
56
+ codeBlockText?: string;
57
+ codeBlockBg?: string;
58
+ horizontalRule?: string;
59
+ }
60
+
31
61
  export { }