feat: fix signature editor init and expand README
Build and Push Multi-Platform Images / build-and-push (push) Successful in 18s
Build and Push Multi-Platform Images / build-and-push (push) Successful in 18s
- Pass initialContent prop to WysiwygEditor instead of imperative setContent to ensure mail signature loads correctly on mount - Rewrite README to reflect full project scope (scanner inbox, email import, postprocessing rules, label printing, OIDC auth) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -26,6 +26,7 @@ export interface WysiwygEditorHandle {
|
||||
|
||||
interface WysiwygEditorProps {
|
||||
minHeight?: number;
|
||||
initialContent?: string;
|
||||
}
|
||||
|
||||
function ToolBtn({
|
||||
@@ -69,14 +70,14 @@ const HEADING_OPTIONS = [
|
||||
];
|
||||
|
||||
export const WysiwygEditor = forwardRef<WysiwygEditorHandle, WysiwygEditorProps>(
|
||||
({ minHeight = 200 }, ref) => {
|
||||
({ minHeight = 200, initialContent }, ref) => {
|
||||
const editor = useEditor({
|
||||
extensions: [
|
||||
StarterKit,
|
||||
Underline,
|
||||
TextAlign.configure({ types: ['heading', 'paragraph'] }),
|
||||
],
|
||||
content: '',
|
||||
content: initialContent ?? '',
|
||||
});
|
||||
|
||||
useImperativeHandle(
|
||||
|
||||
Reference in New Issue
Block a user