Icons are invisible if Prosemirror is inside Shadow DOM #30
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Issue details
Following this example I can get ProseMirror to work fine in Light DOM, but not in Shadow DOM. Here is my code (my HTML file does nothing but embed a
test-element):This is an example of how it looks:

ProseMirror version
I installed them from NPM, which got the following versions:
Affected platforms
The prosemirror-menu package (which for some reason isn't mentioned in the code but is visible in the screenshot) is defining the icons in the top
document, which apparently doesn't allow them to be linked inside a shadow DOM. That package isn't really maintained, and it might be a better approach to build your own custom menu.I had the same error. Try with this
The icons the you are missing are inside the element with id
ProseMirror-icon-collection, So, you just need move that element to inside of the shadow dom.Do not forget wrap you editor in one aditional element
I ended up going to the live example and grabbing the svgs from the element with the id
#ProseMirror-icon-collectionand add them to my webcomponent