tangled
alpha
login
or
join now
leaflet.pub
/
leaflet
289
fork
atom
a tool for shared writing and social publishing
289
fork
atom
overview
issues
28
pulls
pipelines
support h4
awarm.space
1 week ago
4f9a2dc7
e5d8f977
+8
-1
3 changed files
expand all
collapse all
unified
split
components
Blocks
TextBlock
index.tsx
inputRules.ts
useHandlePaste.ts
+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
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
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
213
-
new InputRule(/^([#]{1,3})\s$/, (state, match) => {
213
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
247
+
case "H4": {
248
248
+
headingLevel = 4;
249
249
+
type = "heading";
250
250
+
break;
251
251
+
}
247
252
case "DIV": {
248
253
type = "card";
249
254
break;