Skip to content

Commit a9b8ea7

Browse files
committed
fix: remove hard break restriction in headings and adjust line heights in WysiwygThemeWrapper
1 parent d5b4d40 commit a9b8ea7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/editor/extensions/Heading/heading-extension.ts

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ export class LineHeadingExtension extends HeadingExtension {
1717
createNodeSpec(extra: ApplySchemaAttributes, override: NodeSpecOverride): NodeExtensionSpec {
1818
return {
1919
...super.createNodeSpec(extra, override),
20-
content: 'text*', // Disallow hard breaks in headings
2120
}
2221
}
2322

src/editor/theme/WysiwygThemeWrapper.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ export const WysiwygThemeWrapper = styled.div.attrs<WarpperProps>((p) => ({
102102
Consolas,
103103
Liberation Mono,
104104
monospace;
105-
line-height: 10px;
106105
color: ${(props) => props.theme.kbdFontColor};
107106
vertical-align: middle;
108107
background-color: ${(props) => props.theme.kbdBgColor};
@@ -736,10 +735,12 @@ export const WysiwygThemeWrapper = styled.div.attrs<WarpperProps>((p) => ({
736735
max-width: 400px;
737736
border-radius: 0.2em;
738737
background-color: ${(props) => props.theme.bgColor};
738+
line-height: normal;
739739
z-index: 1;
740740
}
741741
742742
.inline-html-render {
743+
line-height: normal;
743744
}
744745
745746
.html-node {

0 commit comments

Comments
 (0)