Skip to content

Conversation

@BryanValverdeU
Copy link
Contributor

@BryanValverdeU BryanValverdeU commented Apr 29, 2025

When copying lists from PowerPoint Desktop, the lists added to the clipboard are not UL/OL elements, which causes that the end result when pasting when user press Enter the lists do not continue.

So to fix, transform the clipboard contents to lists by using the available metadata:

image

In the above image, is an example of a list from PowerPoint.

  1. The class 0# represents the depth of the list item, if the list is in the first level, the class is not present. So we use this to determine the level of the list. For example, if the class is not present, the level of the list item should be only 1. But if the class is present for example 0n, the list level should be n + 1.
  2. The element with the style mso-special-format is the element with the bullet. The value of that style also represents the type of list and the start number of the list. for example, numbullet6\,1 means that the list is LowerAlpha and that the list starts with 1. The available numbered list are shown in the below image:
    image
  3. SInce the span with mso-special-format is the representation of the bullet, when processing that element, we just return as the list marker will be added to the LI element instead.

For unordered lists, this is the enum of the by default lists markers:
image

Power point sets different type of markers, using the Wingdings font, we could add all those markers to be supported in Rooster, but for this PR I only added support for the default markers in PowerPoint, which are the below:
image

…atedBorderColorParser; update imports and constants for bullet list types
@BryanValverdeU BryanValverdeU changed the title Support List Pasting from PowerPoint Support List Pasting from PowerPoint Desktop Apr 29, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR improves the handling of pasted lists from PowerPoint and Word by refactoring list processing functions, updating parser import paths, and revising test expectations to accurately reflect the new behavior.

  • Refactored list processing by introducing utility functions (setupListFormat and processAsListItem) across Word and PowerPoint paste flows.
  • Updated import paths for parsers and deprecated functions, and adjusted test expectations accordingly.
  • Enhanced bullet metadata extraction for PowerPoint list items to support additional bullet types.

Reviewed Changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/roosterjs-content-model-plugins/test/paste/word/processPastedContentFromWordDesktopTest.ts Updated runTest call with new parameter to remove undefined values.
packages/roosterjs-content-model-plugins/test/paste/utils/linkParserTest.ts Updated import path for parseLink.
packages/roosterjs-content-model-plugins/test/paste/utils/deprecatedColorParserTest.ts Updated import path for deprecatedBorderColorParser.
packages/roosterjs-content-model-plugins/test/paste/plugin/ContentModelPastePluginTest.ts Modified test expectations for parser and processor invocation counts.
packages/roosterjs-content-model-plugins/lib/paste/utils/customListUtils.ts Introduced list utility functions for setting up and processing list items.
packages/roosterjs-content-model-plugins/lib/paste/WordDesktop/processWordLists.ts Refactored Word list processing to use new list utilities and metadata handling.
packages/roosterjs-content-model-plugins/lib/paste/WordDesktop/processPastedContentFromWordDesktop.ts Updated import for removeNegativeTextIndentParser and renamed an unused parameter.
packages/roosterjs-content-model-plugins/lib/paste/PowerPoint/processPastedContentFromPowerPoint.ts Added list processing for PowerPoint pastes and enhanced bullet metadata extraction.
packages/roosterjs-content-model-plugins/lib/paste/PastePlugin.ts Adjusted import paths for linkParser and deprecatedBorderColorParser.
packages/roosterjs-content-model-dom/lib/constants/UnorderedListStyleMap.ts
packages/roosterjs-content-model-dom/lib/constants/BulletListType.ts
Added new bullet types and updated corresponding mappings.
packages/roosterjs-content-model-core/test/command/paste/pasteTest.ts Updated expected invocation counts in paste tests in line with changes to parser and processor usage.

…processPastedContentFromPowerPoint.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@BryanValverdeU BryanValverdeU marked this pull request as draft April 29, 2025 22:20
@BryanValverdeU BryanValverdeU marked this pull request as ready for review May 5, 2025 16:05
Xrhombus: 11,
/**
* Check mark bullet type
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this empty line

}
}

function listLevelParser(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since it is a parser, let's declare it as a parser, following the same pattern with line 84

@BryanValverdeU BryanValverdeU merged commit ed226f0 into master May 8, 2025
7 checks passed
BryanValverdeU added a commit that referenced this pull request May 8, 2025
* Use FormatContainer to represent DIV with id (#3003)

* Fix #3005 (#3007)

* Fix a cache issue (#3006)

* Refactor getStyleMetadata to not rely on DomCreator and only use String handling (#3010)

* Refactor paste plugin to remove unused DOMCreator parameter and enhance style extraction logic

* fix test

* Change search string to lowercase

* Clean image edit when undo (#3015)

* undo image

* undo image

* undo image

* Add 'CustomCopyCut' experimental feature to fix some copy cut bugs (#3000)

* Add 'CustomCopyCut' experimental feature to enhance copy/cut behavior

* Implement pruneUnselectedModel utility for optimizing copy/paste behavior

* Try fix iuld

* Address comment and fix broken tests

* Revert unneeded change

* Refactor pruneUnselectedModel

---------

Co-authored-by: Jiuqing Song <jisong@microsoft.com>

* Demo site: Add preset content for undeleteable anchor (#3014)

Co-authored-by: Bryan Valverde U <bvalverde@microsoft.com>

* Revert "Refactor getStyleMetadata to not rely on DomCreator and only use Stri…" (#3020)

This reverts commit 5bbab35.

* Add API playground for createModelFromHTML (#3019)

* Add API playground for createModelFromHTML

* imporve

---------

Co-authored-by: Bryan Valverde U <bvalverde@microsoft.com>

* Do not copy div ID on Enter (#3011)

* wip

* insertCustom

* refactor

* formatKeys

* Add image hidden marker (#3021)

Instead of using a dataset to store the isEditing property, a hidden property is now used. To support this, get/set functions and the ImageMarkerFormat were introduced. The imageMarker property can now be accessed through the format property of the image.
This change eliminates the need to manually remove the dataset from the image element when extracting content from the DOM.

* Include ImageMetadata in FormatState (#3023)

* Support List Pasting from PowerPoint Desktop (#3012)

* Refactor paste parsers: add removeNegativeTextIndentParser and deprecatedBorderColorParser; update imports and constants for bullet list types

* Update packages/roosterjs-content-model-plugins/lib/paste/PowerPoint/processPastedContentFromPowerPoint.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Refactor bullet list constants and improve format parser signatures

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Remove comments `<!--` and `-->` from styles and re apply fix for Word Desktop Pasting  (#3024)

* Update dependencies and enhance paste functionality by cleaning HTML comments in style tags

* Reapply "Refactor getStyleMetadata to not rely on DomCreator and only use Stri…" (#3020)

This reverts commit 32f47bf.

* Enhance cleanHtmlComments to handle both HTML comment formats in style tags

* Set original DOMPurify

* Update packages/roosterjs-content-model-plugins/lib/paste/WordDesktop/getStyleMetadata.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Ensure headEndIndex is valid

* address comment

* Address comments

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Jiuqing Song <jisong@microsoft.com>

* Bump main version to 9.27.0 in versions.json

* insert link in the image (#3027)

When the image is selected, do not replace the image with the link, add the link to image segment.

* square (#3029)

Instead of using a square character, this change updates the square style to use the 'square' style.

* Normalize default format (#3028)

* Normalize default format

* improve

---------

Co-authored-by: Bryan Valverde U <bvalverde@microsoft.com>

* auto link (#3026)

* Add margin-inline-start to watermark styles for improved positioning (#3031)

---------

Co-authored-by: Jiuqing Song <jisong@microsoft.com>
Co-authored-by: Julia Roldi <87443959+juliaroldi@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
ianeli1 added a commit that referenced this pull request May 24, 2025
* Use FormatContainer to represent DIV with id (#3003)

* Fix #3005 (#3007)

* Fix a cache issue (#3006)

* Refactor getStyleMetadata to not rely on DomCreator and only use String handling (#3010)

* Refactor paste plugin to remove unused DOMCreator parameter and enhance style extraction logic

* fix test

* Change search string to lowercase

* Clean image edit when undo (#3015)

* undo image

* undo image

* undo image

* Add 'CustomCopyCut' experimental feature to fix some copy cut bugs (#3000)

* Add 'CustomCopyCut' experimental feature to enhance copy/cut behavior

* Implement pruneUnselectedModel utility for optimizing copy/paste behavior

* Try fix iuld

* Address comment and fix broken tests

* Revert unneeded change

* Refactor pruneUnselectedModel

---------

Co-authored-by: Jiuqing Song <jisong@microsoft.com>

* Demo site: Add preset content for undeleteable anchor (#3014)

Co-authored-by: Bryan Valverde U <bvalverde@microsoft.com>

* Revert "Refactor getStyleMetadata to not rely on DomCreator and only use Stri…" (#3020)

This reverts commit 5bbab35.

* Add API playground for createModelFromHTML (#3019)

* Add API playground for createModelFromHTML

* imporve

---------

Co-authored-by: Bryan Valverde U <bvalverde@microsoft.com>

* Do not copy div ID on Enter (#3011)

* wip

* insertCustom

* refactor

* formatKeys

* Add image hidden marker (#3021)

Instead of using a dataset to store the isEditing property, a hidden property is now used. To support this, get/set functions and the ImageMarkerFormat were introduced. The imageMarker property can now be accessed through the format property of the image.
This change eliminates the need to manually remove the dataset from the image element when extracting content from the DOM.

* Include ImageMetadata in FormatState (#3023)

* Support List Pasting from PowerPoint Desktop (#3012)

* Refactor paste parsers: add removeNegativeTextIndentParser and deprecatedBorderColorParser; update imports and constants for bullet list types

* Update packages/roosterjs-content-model-plugins/lib/paste/PowerPoint/processPastedContentFromPowerPoint.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Refactor bullet list constants and improve format parser signatures

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Remove comments `<!--` and `-->` from styles and re apply fix for Word Desktop Pasting  (#3024)

* Update dependencies and enhance paste functionality by cleaning HTML comments in style tags

* Reapply "Refactor getStyleMetadata to not rely on DomCreator and only use Stri…" (#3020)

This reverts commit 32f47bf.

* Enhance cleanHtmlComments to handle both HTML comment formats in style tags

* Set original DOMPurify

* Update packages/roosterjs-content-model-plugins/lib/paste/WordDesktop/getStyleMetadata.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Ensure headEndIndex is valid

* address comment

* Address comments

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Jiuqing Song <jisong@microsoft.com>

* insert link in the image (#3027)

When the image is selected, do not replace the image with the link, add the link to image segment.

* square (#3029)

Instead of using a square character, this change updates the square style to use the 'square' style.

* Normalize default format (#3028)

* Normalize default format

* improve

---------

Co-authored-by: Bryan Valverde U <bvalverde@microsoft.com>

* auto link (#3026)

* Add margin-inline-start to watermark styles for improved positioning (#3031)

* Allow queryContentModelBlocks to query blocks in entities (#3032)

* Allow queryContentModelBlocks to search children of entity

* Expect EditorContext instead

* Break out createEditorContextForEntity function into separate file and add tests

* Fix 353323: Keep indentation when start a list, and refactor (#3033)

* 353323

* fix build, add test

* improve

* Edit plugin Options (#3036)

* options

* add test

* Do not indent on TAB (#3039)

* keyboard tab

* remove import

* Fix 354663 (#3038)

* Fix 354663

* export the new function

* Fix Word Desktop paste case (#3034)

Co-authored-by: Jiuqing Song <jisong@microsoft.com>

* Add height property to table rows in paste tests and processor (#3045)

* Add height property to table rows in paste tests and processor

* Fix build

* Remove local change

* Fix A11y bug with table selection (#3041)

* Fix A11y bug with table selection

* Add comment

* Fix 341291 (#3046)

* Fix Word Desktop pasting when using Safari (#3047)

* Enhance paste functionality: support additional document types and extract HTML head content

* Fix paste source validations for Safari: update environment handling and improve document detection logic

* Add environment param back

* Prevent multiple event attachments for mousemove in SelectionPlugin (#3049)

* Prevent multiple event attachments for mousemove in SelectionPlugin

* Update packages/roosterjs-content-model-core/test/corePlugin/selection/SelectionPluginTest.ts

* Refactor mouse event handling in SelectionPlugin to ensure proper cleanup and re-attachment on mouseDown events

* Only paste text content of button (#3050)

* Enhance paste functionality: Update setProcessor call counts in tests and add pasteButtonProcessor unit tests

* Refactor pasteButtonProcessor: Enhance button element processing and add comprehensive unit tests

* Support table edit with logical root (#3048)

* Support table edit with logical root

* fix build and test

---------

Co-authored-by: Bryan Valverde U <bvalverde@microsoft.com>

* Bump to 9.29.0

* Fix broken code

---------

Co-authored-by: Jiuqing Song <jisong@microsoft.com>
Co-authored-by: Bryan Valverde U <bvalverde@microsoft.com>
Co-authored-by: Julia Roldi <87443959+juliaroldi@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: florian-msft <87671048+florian-msft@users.noreply.github.com>
JiuqingSong added a commit that referenced this pull request May 27, 2025
* Use FormatContainer to represent DIV with id (#3003)

* Fix #3005 (#3007)

* Fix a cache issue (#3006)

* Refactor getStyleMetadata to not rely on DomCreator and only use String handling (#3010)

* Refactor paste plugin to remove unused DOMCreator parameter and enhance style extraction logic

* fix test

* Change search string to lowercase

* Clean image edit when undo (#3015)

* undo image

* undo image

* undo image

* Add 'CustomCopyCut' experimental feature to fix some copy cut bugs (#3000)

* Add 'CustomCopyCut' experimental feature to enhance copy/cut behavior

* Implement pruneUnselectedModel utility for optimizing copy/paste behavior

* Try fix iuld

* Address comment and fix broken tests

* Revert unneeded change

* Refactor pruneUnselectedModel

---------

Co-authored-by: Jiuqing Song <jisong@microsoft.com>

* Demo site: Add preset content for undeleteable anchor (#3014)

Co-authored-by: Bryan Valverde U <bvalverde@microsoft.com>

* Revert "Refactor getStyleMetadata to not rely on DomCreator and only use Stri…" (#3020)

This reverts commit 5bbab35.

* Add API playground for createModelFromHTML (#3019)

* Add API playground for createModelFromHTML

* imporve

---------

Co-authored-by: Bryan Valverde U <bvalverde@microsoft.com>

* Do not copy div ID on Enter (#3011)

* wip

* insertCustom

* refactor

* formatKeys

* Add image hidden marker (#3021)

Instead of using a dataset to store the isEditing property, a hidden property is now used. To support this, get/set functions and the ImageMarkerFormat were introduced. The imageMarker property can now be accessed through the format property of the image.
This change eliminates the need to manually remove the dataset from the image element when extracting content from the DOM.

* Include ImageMetadata in FormatState (#3023)

* Support List Pasting from PowerPoint Desktop (#3012)

* Refactor paste parsers: add removeNegativeTextIndentParser and deprecatedBorderColorParser; update imports and constants for bullet list types

* Update packages/roosterjs-content-model-plugins/lib/paste/PowerPoint/processPastedContentFromPowerPoint.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Refactor bullet list constants and improve format parser signatures

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Remove comments `<!--` and `-->` from styles and re apply fix for Word Desktop Pasting  (#3024)

* Update dependencies and enhance paste functionality by cleaning HTML comments in style tags

* Reapply "Refactor getStyleMetadata to not rely on DomCreator and only use Stri…" (#3020)

This reverts commit 32f47bf.

* Enhance cleanHtmlComments to handle both HTML comment formats in style tags

* Set original DOMPurify

* Update packages/roosterjs-content-model-plugins/lib/paste/WordDesktop/getStyleMetadata.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Ensure headEndIndex is valid

* address comment

* Address comments

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Jiuqing Song <jisong@microsoft.com>

* insert link in the image (#3027)

When the image is selected, do not replace the image with the link, add the link to image segment.

* square (#3029)

Instead of using a square character, this change updates the square style to use the 'square' style.

* Normalize default format (#3028)

* Normalize default format

* improve

---------

Co-authored-by: Bryan Valverde U <bvalverde@microsoft.com>

* auto link (#3026)

* Add margin-inline-start to watermark styles for improved positioning (#3031)

* Allow queryContentModelBlocks to query blocks in entities (#3032)

* Allow queryContentModelBlocks to search children of entity

* Expect EditorContext instead

* Break out createEditorContextForEntity function into separate file and add tests

* Fix 353323: Keep indentation when start a list, and refactor (#3033)

* 353323

* fix build, add test

* improve

* Edit plugin Options (#3036)

* options

* add test

* Do not indent on TAB (#3039)

* keyboard tab

* remove import

* Fix 354663 (#3038)

* Fix 354663

* export the new function

* Fix Word Desktop paste case (#3034)

Co-authored-by: Jiuqing Song <jisong@microsoft.com>

* Add height property to table rows in paste tests and processor (#3045)

* Add height property to table rows in paste tests and processor

* Fix build

* Remove local change

* Fix A11y bug with table selection (#3041)

* Fix A11y bug with table selection

* Add comment

* Fix 341291 (#3046)

* Fix Word Desktop pasting when using Safari (#3047)

* Enhance paste functionality: support additional document types and extract HTML head content

* Fix paste source validations for Safari: update environment handling and improve document detection logic

* Add environment param back

* Prevent multiple event attachments for mousemove in SelectionPlugin (#3049)

* Prevent multiple event attachments for mousemove in SelectionPlugin

* Update packages/roosterjs-content-model-core/test/corePlugin/selection/SelectionPluginTest.ts

* Refactor mouse event handling in SelectionPlugin to ensure proper cleanup and re-attachment on mouseDown events

* Only paste text content of button (#3050)

* Enhance paste functionality: Update setProcessor call counts in tests and add pasteButtonProcessor unit tests

* Refactor pasteButtonProcessor: Enhance button element processing and add comprehensive unit tests

* Support table edit with logical root (#3048)

* Support table edit with logical root

* fix build and test

---------

Co-authored-by: Bryan Valverde U <bvalverde@microsoft.com>

* If font family already has single quote, keep it (#3055)

* 9.29.1

---------

Co-authored-by: Bryan Valverde U <bvalverde@microsoft.com>
Co-authored-by: Julia Roldi <87443959+juliaroldi@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: florian-msft <87671048+florian-msft@users.noreply.github.com>
BryanValverdeU added a commit that referenced this pull request May 28, 2025
* Use FormatContainer to represent DIV with id (#3003)

* Fix #3005 (#3007)

* Fix a cache issue (#3006)

* Refactor getStyleMetadata to not rely on DomCreator and only use String handling (#3010)

* Refactor paste plugin to remove unused DOMCreator parameter and enhance style extraction logic

* fix test

* Change search string to lowercase

* Clean image edit when undo (#3015)

* undo image

* undo image

* undo image

* Add 'CustomCopyCut' experimental feature to fix some copy cut bugs (#3000)

* Add 'CustomCopyCut' experimental feature to enhance copy/cut behavior

* Implement pruneUnselectedModel utility for optimizing copy/paste behavior

* Try fix iuld

* Address comment and fix broken tests

* Revert unneeded change

* Refactor pruneUnselectedModel

---------

Co-authored-by: Jiuqing Song <jisong@microsoft.com>

* Demo site: Add preset content for undeleteable anchor (#3014)

Co-authored-by: Bryan Valverde U <bvalverde@microsoft.com>

* Revert "Refactor getStyleMetadata to not rely on DomCreator and only use Stri…" (#3020)

This reverts commit 5bbab35.

* Add API playground for createModelFromHTML (#3019)

* Add API playground for createModelFromHTML

* imporve

---------

Co-authored-by: Bryan Valverde U <bvalverde@microsoft.com>

* Do not copy div ID on Enter (#3011)

* wip

* insertCustom

* refactor

* formatKeys

* Add image hidden marker (#3021)

Instead of using a dataset to store the isEditing property, a hidden property is now used. To support this, get/set functions and the ImageMarkerFormat were introduced. The imageMarker property can now be accessed through the format property of the image.
This change eliminates the need to manually remove the dataset from the image element when extracting content from the DOM.

* Include ImageMetadata in FormatState (#3023)

* Support List Pasting from PowerPoint Desktop (#3012)

* Refactor paste parsers: add removeNegativeTextIndentParser and deprecatedBorderColorParser; update imports and constants for bullet list types

* Update packages/roosterjs-content-model-plugins/lib/paste/PowerPoint/processPastedContentFromPowerPoint.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Refactor bullet list constants and improve format parser signatures

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Remove comments `<!--` and `-->` from styles and re apply fix for Word Desktop Pasting  (#3024)

* Update dependencies and enhance paste functionality by cleaning HTML comments in style tags

* Reapply "Refactor getStyleMetadata to not rely on DomCreator and only use Stri…" (#3020)

This reverts commit 32f47bf.

* Enhance cleanHtmlComments to handle both HTML comment formats in style tags

* Set original DOMPurify

* Update packages/roosterjs-content-model-plugins/lib/paste/WordDesktop/getStyleMetadata.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Ensure headEndIndex is valid

* address comment

* Address comments

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Jiuqing Song <jisong@microsoft.com>

* insert link in the image (#3027)

When the image is selected, do not replace the image with the link, add the link to image segment.

* square (#3029)

Instead of using a square character, this change updates the square style to use the 'square' style.

* Normalize default format (#3028)

* Normalize default format

* improve

---------

Co-authored-by: Bryan Valverde U <bvalverde@microsoft.com>

* auto link (#3026)

* Add margin-inline-start to watermark styles for improved positioning (#3031)

* Allow queryContentModelBlocks to query blocks in entities (#3032)

* Allow queryContentModelBlocks to search children of entity

* Expect EditorContext instead

* Break out createEditorContextForEntity function into separate file and add tests

* Fix 353323: Keep indentation when start a list, and refactor (#3033)

* 353323

* fix build, add test

* improve

* Edit plugin Options (#3036)

* options

* add test

* Do not indent on TAB (#3039)

* keyboard tab

* remove import

* Fix 354663 (#3038)

* Fix 354663

* export the new function

* Fix Word Desktop paste case (#3034)

Co-authored-by: Jiuqing Song <jisong@microsoft.com>

* Add height property to table rows in paste tests and processor (#3045)

* Add height property to table rows in paste tests and processor

* Fix build

* Remove local change

* Fix A11y bug with table selection (#3041)

* Fix A11y bug with table selection

* Add comment

* Fix 341291 (#3046)

* Fix Word Desktop pasting when using Safari (#3047)

* Enhance paste functionality: support additional document types and extract HTML head content

* Fix paste source validations for Safari: update environment handling and improve document detection logic

* Add environment param back

* Prevent multiple event attachments for mousemove in SelectionPlugin (#3049)

* Prevent multiple event attachments for mousemove in SelectionPlugin

* Update packages/roosterjs-content-model-core/test/corePlugin/selection/SelectionPluginTest.ts

* Refactor mouse event handling in SelectionPlugin to ensure proper cleanup and re-attachment on mouseDown events

* Only paste text content of button (#3050)

* Enhance paste functionality: Update setProcessor call counts in tests and add pasteButtonProcessor unit tests

* Refactor pasteButtonProcessor: Enhance button element processing and add comprehensive unit tests

* Support table edit with logical root (#3048)

* Support table edit with logical root

* fix build and test

---------

Co-authored-by: Bryan Valverde U <bvalverde@microsoft.com>

* If font family already has single quote, keep it (#3055)

* Fix announcing in lists (#3058)

* Fix announcing in lists

* fix tests in FF

* Add role="presentation" to generic role elements in list items for better screen reader support

* Bump roosterjs-content-model-dom version to 9.29.2

---------

Co-authored-by: Jiuqing Song <jisong@microsoft.com>
Co-authored-by: Julia Roldi <87443959+juliaroldi@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: florian-msft <87671048+florian-msft@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants