You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use ngx-quill in a custom component (created using Angular Elements). The purpose is to create Angular based plugins to be hosted in another Angular application. To ensure that styles in my Angular Elements component will not affect the hosting application, I have set encapsulation to ViewEncapsulation.ShadowDom in my component (default is ViewEncapsulation.Emulated):
My problem is that ViewEncapsulation.ShadowDom changes the behavior of the quill editor, especially for numbered lists and bullet lists. It is also not possible to use the tab key to change indent level for list items.
If I change the encapsulation back to ViewEncapsulation.Emulated, the editor works perfectly fine. But... then I risk leaking styles into the application that will host my custom component.
The text was updated successfully, but these errors were encountered:
If you use the default emulated encapsulation there should be nothing leaking in the host component.
Because each component and styling gets encapsulated by a custom data attribute.
This is a core functionality of angular. ;)
EDIT: If you need to support more than the latest browser versions you need a shadowdom polyfill, as well ;)
I am trying to use ngx-quill in a custom component (created using Angular Elements). The purpose is to create Angular based plugins to be hosted in another Angular application. To ensure that styles in my Angular Elements component will not affect the hosting application, I have set encapsulation to ViewEncapsulation.ShadowDom in my component (default is ViewEncapsulation.Emulated):
To make this work, I also import the quill css files in my test.component.scss instead of adding them to angular.json:
My problem is that ViewEncapsulation.ShadowDom changes the behavior of the quill editor, especially for numbered lists and bullet lists. It is also not possible to use the tab key to change indent level for list items.
If I change the encapsulation back to ViewEncapsulation.Emulated, the editor works perfectly fine. But... then I risk leaking styles into the application that will host my custom component.
The text was updated successfully, but these errors were encountered: