-
Notifications
You must be signed in to change notification settings - Fork 161
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into u/juliaroldi/delete-link-on-image
- Loading branch information
Showing
70 changed files
with
991 additions
and
761 deletions.
There are no files selected for viewing
54 changes: 54 additions & 0 deletions
54
...ages-content-model/roosterjs-content-model-dom/lib/config/defaultContentModelFormatMap.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import { DefaultImplicitFormatMap } from 'roosterjs-content-model-types'; | ||
|
||
/** | ||
* @internal | ||
* A map from tag name to its default implicit formats | ||
*/ | ||
export const defaultContentModelFormatMap: DefaultImplicitFormatMap = { | ||
a: { | ||
underline: true, | ||
}, | ||
blockquote: { | ||
marginTop: '1em', | ||
marginBottom: '1em', | ||
marginLeft: '40px', | ||
marginRight: '40px', | ||
}, | ||
code: { | ||
fontFamily: 'monospace', | ||
}, | ||
h1: { | ||
fontWeight: 'bold', | ||
fontSize: '2em', | ||
}, | ||
h2: { | ||
fontWeight: 'bold', | ||
fontSize: '1.5em', | ||
}, | ||
h3: { | ||
fontWeight: 'bold', | ||
fontSize: '1.17em', | ||
}, | ||
h4: { | ||
fontWeight: 'bold', | ||
fontSize: '1em', // Set this default value here to overwrite existing font size when change heading level | ||
}, | ||
h5: { | ||
fontWeight: 'bold', | ||
fontSize: '0.83em', | ||
}, | ||
h6: { | ||
fontWeight: 'bold', | ||
fontSize: '0.67em', | ||
}, | ||
p: { | ||
marginTop: '1em', | ||
marginBottom: '1em', | ||
}, | ||
pre: { | ||
fontFamily: 'monospace', | ||
whiteSpace: 'pre', | ||
marginTop: '1em', | ||
marginBottom: '1em', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 6 additions & 13 deletions
19
packages-content-model/roosterjs-content-model-dom/lib/domToModel/domToContentModel.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.