Skip to content

Conversation

@enkeli
Copy link

@enkeli enkeli commented Aug 1, 2022

When using angular-editor under a shadow dom encapsulated component, it was throwing errors as it tried to find some elements by their id's using the global document api:
angular_editor_error

This pull request tries to solve it by changing the way we access those elements using Angular's ElementRef instead of document.
It also adds a new page on the angular-editor-app project to showcase the use of angular-editor under a shadow dom encapsulated component.

Test are passing:
angular_editor_tests

add page to demo shadow dom support, change the getElementByID call from the document to a more angular friendly way to support shadow dom encapsulation
@codecov
Copy link

codecov bot commented Aug 1, 2022

Codecov Report

Merging #479 (c2cfe4b) into master (40431f4) will increase coverage by 0.24%.
The diff coverage is 50.00%.

@@            Coverage Diff             @@
##           master     #479      +/-   ##
==========================================
+ Coverage   20.66%   20.91%   +0.24%     
==========================================
  Files           8        8              
  Lines         479      483       +4     
  Branches      103      103              
==========================================
+ Hits           99      101       +2     
- Misses        377      379       +2     
  Partials        3        3              
Impacted Files Coverage Δ
...editor/src/lib/angular-editor-toolbar.component.ts 18.25% <42.85%> (+0.51%) ⬆️
...angular-editor/src/lib/angular-editor.component.ts 17.44% <60.00%> (+0.38%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 40431f4...c2cfe4b. Read the comment docs.

@MeAkib
Copy link

MeAkib commented Oct 14, 2022

The same issue is happening to me. Does anyone have a solution?

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