Skip to content
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

Standalone Editor: Remove dependency to old code from api and plugins package #2349

Merged
merged 2 commits into from
Jan 22, 2024

Conversation

JiuqingSong
Copy link
Collaborator

Remove dependencies to the following packages:

  • roosterjs-editor-types
  • roosterjs-editor-dom

From the following packages:

  • roosterjs-content-model-api
  • roosterjs-content-model-plugins

This has impacts to the following areas:

  • matchLink(): Copy the function to roosterjs-content-model-api package
  • Entity type: Just simply remove the type declaration when return it in insertEntity API as a short term solution. For log term, we may need to remove this return value at all.
  • HtmlSanitizer: We are using it in insertLink API just for detecting if the link has something like "script:". We can just copy the code into this file directly
  • EntityDelimiterPlugin: We have planned to port this plugin to be compatible with StandaloneEditor. For now let's just move it into roosterjs-content-model-editor package as a core plugin. Once it is ported, we can move it into roosterjs-content-model-core package

After this change, content model code has fully got rid of old editor code (except roosterjs-content-model-editor package which will be moved out of content model folder later)

@JiuqingSong JiuqingSong merged commit 019f861 into master Jan 22, 2024
7 checks passed
@JiuqingSong JiuqingSong deleted the u/jisong/removedep branch January 22, 2024 22:53
Andres-CT98 added a commit that referenced this pull request Feb 2, 2024
* wip

* wip

* refactor

* fix dependecies

* fix dependecies

* fix dependecies

* WIP

* add test

* add tests

* types

* add comment

* add comment

* add comment

* add comment

* add comment

* comments

* fix build

* fixes

* fixes

* refactor

* fixes

* Add shortcut support Ctrl+K for insertLink  (#2333)

* Add shortcut support Ctrl+K for insertLink

* Add metakey and alt key checks

* Add insertButton check and disable param

* add options to ribbon and decouple onButtonClick

* update

* update fix

* add break statement

* remove duplicate imports

---------

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

* Content Model: Add back ContentModelBeforePasteEvent (#2347)

* Use margin-top and bottom for list margin (#2346)

* Standalone Editor: Improve cache (3rd try) (#2344)

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

* fixes

* fix test

* Fix safari selection issue (#2332)

* try fix safari selection issue

* fix content model editor, add test

* fix focus bug

* Standalone Editor: Remove dependency to old code from api and plugins package (#2349)

* Content Model: Decouple test code from old code (#2351)

* Fix demo site (#2353)

* Content Model: Fix table text color (#2359)

* Fix pending format (#2354)

* Fix pending format

* improve

* Standalone Editor: Provide a DOMHelper to allow access DOM tree (#2363)

* Fix shadow edit (#2355)

* Fix 2 shadow edit issue (#2356)

* Support unit "inch" when parse value (#2357)

* Content Model: Support inch when parse unit value

* add comment

* Code clean up: small refactor to paste code (#2365)

* Refactor paste

* add test

* Code clean up: Remove IStandaloneEditor.setContentModel (#2364)

* Add support to cursor around Block entities. (#2350)

* rotator space

* Port ContextMenu plugin (#2366)

* Port ContextMenu plugin

* add test

* Content Model: Fix 252436 (#2367)

* Content Model: Fix 252436

* add test

---------

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

* Code cleanup: Remove parameter onNodeCreated (#2374)

* Code cleanup: Remove isContentModelEditor (#2371)

* Code cleanup: Remove isContentModelEditor

* add buttons

* Add `isReverted` to DOM Selection (#2368)

* add Changes

* add Tests

* fix dependencies

* address comments

* address comment

* fix after merge

* fix test

---------

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

* Code cleanup: Remove NormalizeTablePlugin (#2376)

* add normalize content model

* fix build

* Code cleanup: Replace createContentModel with getContentModelCopy (#2372)

* Code cleanup: Remove isContentModelEditor

* add buttons

* Code cleanup: Replace createContentModel with getContentModelCopy

* Code cleanup: Remove get/setZoomScale (#2378)

* Code cleanup: Remove get/setZoomScale

* Add calculateZoomScale function

* improve

* Code cleanup: Move isNodeInEditor into DOMHelper (#2379)

* Code cleanup: Remove TODO (#2384)

* Add write permission to deploy action (#2383)

* Revert "Add support to cursor around Block entities. (#2350)" (#2390)

This reverts commit 7998d03.

* Content Model: Fix #2202 (#2389)

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

* bump

---------

Co-authored-by: Júlia Roldi <juliaroldi@microsoft.com>
Co-authored-by: Julia Roldi <87443959+juliaroldi@users.noreply.github.com>
Co-authored-by: Gani <107857762+gm-al@users.noreply.github.com>
Co-authored-by: Ghanem10 <107857762+Ghanem10@users.noreply.github.com>
Co-authored-by: Jiuqing Song <jisong@microsoft.com>
Co-authored-by: Bryan Valverde U <bvalverde@microsoft.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.

2 participants