a tool for shared writing and social publishing

support h4

+8 -1
+2
components/Blocks/TextBlock/index.tsx
··· 34 34 1: "font-bold [font-family:var(--theme-heading-font)]", 35 35 2: "font-bold [font-family:var(--theme-heading-font)]", 36 36 3: "font-bold text-secondary [font-family:var(--theme-heading-font)]", 37 + 4: "font-bold text-secondary [font-family:var(--theme-heading-font)]", 37 38 } as { [level: number]: string }; 38 39 39 40 const headingFontSize = { 40 41 1: blockTextSize.h1, 41 42 2: blockTextSize.h2, 42 43 3: blockTextSize.h3, 44 + 4: blockTextSize.h4, 43 45 } as { [level: number]: string }; 44 46 45 47 export function TextBlock(
+1 -1
components/Blocks/TextBlock/inputRules.ts
··· 210 210 }), 211 211 212 212 //Header 213 - new InputRule(/^([#]{1,3})\s$/, (state, match) => { 213 + new InputRule(/^([#]{1,4})\s$/, (state, match) => { 214 214 let tr = state.tr; 215 215 tr.delete(0, match[0].length); 216 216 let headingLevel = match[1].length;
+5
components/Blocks/TextBlock/useHandlePaste.ts
··· 244 244 type = "heading"; 245 245 break; 246 246 } 247 + case "H4": { 248 + headingLevel = 4; 249 + type = "heading"; 250 + break; 251 + } 247 252 case "DIV": { 248 253 type = "card"; 249 254 break;