react-edit-to-html 1.1.4 → 1.1.6
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 +9 -0
- package/dist/index.cjs +20 -20
- package/dist/index.js +8873 -8497
- package/dist/react-edit-to-html.css +1 -1
- package/dist/src/App.d.ts +1 -1
- package/dist/src/types.d.ts +18 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -152,6 +152,14 @@ interface HtmlEditorProps {
|
|
|
152
152
|
customButtonStyles?: Record<string, React.CSSProperties>;
|
|
153
153
|
/** Allows passing custom CSS class names dynamically to customize/override button class sheets for header actions */
|
|
154
154
|
customButtonClassNames?: Record<string, string>;
|
|
155
|
+
/** Allows passing completely custom React components for header actions. Receives an onClick prop to trigger the action. */
|
|
156
|
+
customActionComponents?: {
|
|
157
|
+
importHtml?: (props: { onClick: () => void }) => React.ReactNode;
|
|
158
|
+
importPdf?: (props: { onClick: () => void }) => React.ReactNode;
|
|
159
|
+
preview?: (props: { onClick: () => void }) => React.ReactNode;
|
|
160
|
+
exportPdf?: (props: { onClick: () => void }) => React.ReactNode;
|
|
161
|
+
export?: (props: { onClick: () => void }) => React.ReactNode;
|
|
162
|
+
};
|
|
155
163
|
}
|
|
156
164
|
```
|
|
157
165
|
|
|
@@ -179,6 +187,7 @@ interface HtmlEditorProps {
|
|
|
179
187
|
| `showExportPdf` | `boolean` | `true` | Show/hide the "Download PDF" action button in the header. |
|
|
180
188
|
| `customButtonStyles` | `object` | `{}` | Allows passing custom CSS inline style properties dynamically to any of the header actions. |
|
|
181
189
|
| `customButtonClassNames` | `object` | `{}` | Allows passing custom CSS Tailwind class names dynamically to customize/override button class sheets. |
|
|
190
|
+
| `customActionComponents` | `object` | `undefined` | Pass custom React components for header actions (`importHtml`, `importPdf`, `preview`, `exportPdf`, `export`). Render prop receives `{ onClick }`. |
|
|
182
191
|
|
|
183
192
|
### Notes on Table & Sub-Table Types
|
|
184
193
|
|