-
Notifications
You must be signed in to change notification settings - Fork 167
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' of https://github.com/microsoft/roosterjs into …
…u/bvalverde/fixWordDesktopLists
- Loading branch information
Showing
31 changed files
with
602 additions
and
132 deletions.
There are no files selected for viewing
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: 19 additions & 0 deletions
19
demo/scripts/controls/ribbonButtons/contentModel/alignJustifyButton.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,19 @@ | ||
import { isContentModelEditor } from 'roosterjs-content-model-editor'; | ||
import { RibbonButton } from 'roosterjs-react'; | ||
import { setAlignment } from 'roosterjs-content-model-api'; | ||
|
||
/** | ||
* @internal | ||
* "Align justify" button on the format ribbon | ||
*/ | ||
export const alignJustifyButton: RibbonButton<'buttonNameAlignJustify'> = { | ||
key: 'buttonNameAlignJustify', | ||
unlocalizedText: 'Align justify', | ||
iconName: 'AlignJustify', | ||
onClick: editor => { | ||
if (isContentModelEditor(editor)) { | ||
setAlignment(editor, 'justify'); | ||
} | ||
return true; | ||
}, | ||
}; |
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
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
11 changes: 11 additions & 0 deletions
11
...ges-content-model/roosterjs-content-model-core/lib/override/containerWidthFormatParser.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,11 @@ | ||
import type { FormatParser, SizeFormat } from 'roosterjs-content-model-types'; | ||
|
||
/** | ||
* @internal Do not paste width for Format Containers since it may be generated by browser according to temp div width | ||
*/ | ||
export const containerWidthFormatParser: FormatParser<SizeFormat> = (format, element) => { | ||
// For pasted content, there may be existing width generated by browser from the temp DIV. So we need to remove it. | ||
if (element.tagName == 'DIV') { | ||
delete format.width; | ||
} | ||
}; |
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.