-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Content Model minor fix: Change parameter type #1720
Merged
Merged
Conversation
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
JiuqingSong
requested review from
flyingbee2012,
BryanValverdeU,
ianeli1,
juliaroldi and
Andres-CT98
April 13, 2023 21:24
Andres-CT98
approved these changes
Apr 13, 2023
JiuqingSong
added a commit
that referenced
this pull request
Apr 27, 2023
* add tests for image edit * fix build * Move getPasteSource from Plugins to Dom (#1708) * init * try fix tests * Content Model minor fix: Change parameter type (#1720) * Content Model: Fix #1702 Hyperlinking a text doesnt trigger ChangeSource.CreateLink event (#1703) * Content Model: Fix #1702 * fix build * fix test * fix build * Fix #1713 (#1718) * Fix Uncaught TypeError: Cannot read properties of undefined (reading 'parentNode') (#1725) * Fix Unhandled exception * fix test * remove unneeded changes * Decouple logic from Table Cell Selection into smaller files. (#1722) * Refactor * Add comment * Allow Content Model API to remove image border (#1733) * Modify API to allow accepting null * New demo button * Testing * Content Model: Fix #1684 (#1730) * Content Model: Improve edit plugin (#1728) * Content Model fidelity 1: Support lineHeight in list (#1731) * [1/3] Enable Strict mode in TableCellSelection Utils + Plugin (#1735) Enable Strict mode in Table Cell Selection Utils and the Plugin class * Content Model fidelity improvement 2: Support size in divider (#1732) * Content Model fidelity 2: Support size in divider * fix test * Content Model: Improve default format state (#1743) * Content Model: Improve default format state * add a test case * Add check for empty selectors, and empty CSS rule insertion (#1744) * add check for empty selectors, and empty cssRule * fix test case * Content Model: Fix #1738 delete space issue (#1740) * Content Model: Fix #1738 delete space issue * enable edit plugin in demo site by default * Fix space issue * fix cache behavior * Make additionalTagReplacements allow `null` value type. (#1745) * Fix additionalTagReplacements type in HtmlSanitizerOptions.ts * Make compiler happy * [2/3] Enable Strict mode on KeyDown Handler (#1736) * Table cell selection strict mode 1 * enable strict mode on handleKeyDown * [3/3] Enable Strict mode in Mouse Down Handler + Add Strict mode files (#1737) * Table cell selection strict mode 1 * enable strict mode on handleKeyDown * enable strict mode on mousedown * merge conflicts * Change from undefined to null * Revert "Paste as image feature" - convertPastedContentFromExcel (#1749) * revert only convertPastedContentFromExcel.ts * Leverage Content Model to insert the Pasted content from clipboard (#1716) In order to start using content model to insert clipboard content to the editor we need to do some refactor on some utilities: Move the createPasteFragment logic from roosterjs-editor-core package to roosterjs-editor-dom, so we can also use the logic in roosterjs-content-model. Add a new property to BeforePasteEvent to let other plugins modify the way we process elements in the paste fragment, this will be used later in another PR. Create a new core api createPasteModel that will use the PasteFragment to create and return a content model document. In the ContentModelEditor Class, override the paste function so, instead of using insertContent, use mergeModel function Bugs that may be fixes by leveraging Content Model with this change: #456 #1065 #1322 partially, only the paste part is fixed, copy needs to fixed in another PR. #920 * Don't return focus to editor when blur on image (#1742) * Don't return focus to editor when blur on image * Comment * Content Model fidelity improvement 3: Block format (#1751) * Content Model fidelity improvement 3: Block format * improve * fix test * Add a experimental feature for paste with ContentModel #1758 * 8.46.0 --------- Co-authored-by: Júlia Roldi <juliaroldi@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: Ian Elizondo <ianeli@microsoft.com> Co-authored-by: Andres-CT98 <107568016+Andres-CT98@users.noreply.github.com> Co-authored-by: Ruijun Gao <rckgao@gmail.com>
JiuqingSong
added a commit
that referenced
this pull request
Jun 16, 2023
* add tests for image edit * fix build * Move getPasteSource from Plugins to Dom (#1708) * init * try fix tests * Content Model minor fix: Change parameter type (#1720) * Content Model: Fix #1702 Hyperlinking a text doesnt trigger ChangeSource.CreateLink event (#1703) * Content Model: Fix #1702 * fix build * fix test * fix build * Fix #1713 (#1718) * Fix Uncaught TypeError: Cannot read properties of undefined (reading 'parentNode') (#1725) * Fix Unhandled exception * fix test * remove unneeded changes * Decouple logic from Table Cell Selection into smaller files. (#1722) * Refactor * Add comment * Allow Content Model API to remove image border (#1733) * Modify API to allow accepting null * New demo button * Testing * Content Model: Fix #1684 (#1730) * Content Model: Improve edit plugin (#1728) * Content Model fidelity 1: Support lineHeight in list (#1731) * [1/3] Enable Strict mode in TableCellSelection Utils + Plugin (#1735) Enable Strict mode in Table Cell Selection Utils and the Plugin class * Content Model fidelity improvement 2: Support size in divider (#1732) * Content Model fidelity 2: Support size in divider * fix test * Content Model: Improve default format state (#1743) * Content Model: Improve default format state * add a test case * Add check for empty selectors, and empty CSS rule insertion (#1744) * add check for empty selectors, and empty cssRule * fix test case * Content Model: Fix #1738 delete space issue (#1740) * Content Model: Fix #1738 delete space issue * enable edit plugin in demo site by default * Fix space issue * fix cache behavior * Make additionalTagReplacements allow `null` value type. (#1745) * Fix additionalTagReplacements type in HtmlSanitizerOptions.ts * Make compiler happy * [2/3] Enable Strict mode on KeyDown Handler (#1736) * Table cell selection strict mode 1 * enable strict mode on handleKeyDown * [3/3] Enable Strict mode in Mouse Down Handler + Add Strict mode files (#1737) * Table cell selection strict mode 1 * enable strict mode on handleKeyDown * enable strict mode on mousedown * merge conflicts * Change from undefined to null * Revert "Paste as image feature" - convertPastedContentFromExcel (#1749) * revert only convertPastedContentFromExcel.ts * Leverage Content Model to insert the Pasted content from clipboard (#1716) In order to start using content model to insert clipboard content to the editor we need to do some refactor on some utilities: Move the createPasteFragment logic from roosterjs-editor-core package to roosterjs-editor-dom, so we can also use the logic in roosterjs-content-model. Add a new property to BeforePasteEvent to let other plugins modify the way we process elements in the paste fragment, this will be used later in another PR. Create a new core api createPasteModel that will use the PasteFragment to create and return a content model document. In the ContentModelEditor Class, override the paste function so, instead of using insertContent, use mergeModel function Bugs that may be fixes by leveraging Content Model with this change: * Don't return focus to editor when blur on image (#1742) * Don't return focus to editor when blur on image * Comment * Content Model fidelity improvement 3: Block format (#1751) * Content Model fidelity improvement 3: Block format * improve * fix test * Add a experimental feature for paste with ContentModel #1758 * 8.46.0 --------- Co-authored-by: Júlia Roldi <juliaroldi@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: Ian Elizondo <ianeli@microsoft.com> Co-authored-by: Andres-CT98 <107568016+Andres-CT98@users.noreply.github.com> Co-authored-by: Ruijun Gao <rckgao@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With the latest changes,
toggleBlockQuote
API should accept a union of Block format and Segment format, but I forgot to change the parameter type. So fix it in this change and add a test case to make sure it accepts correct format type.