In this example, editor is created inside Shadow Root.
https://codepen.io/artemiusgreat/pen/XWMPdWG
The main concern so far is that inline formatting doesn't work when initiated from Toolbar module by clicking Bold
or Italic
buttons on the panel.
The reason is that window.getSelection
always returns empty selection inside the Shadow Root.
The good thing is that it somehow works when inline formatting is initiated from Keyboard module by pressing CTRL+B or CTRL+I.
I'm digging into the code, but if somebody already resolved this I would appreciate some guidance.
Done.
This fix doesn't cover missing
shadow.getSelection
in Safari but all other browsers should work. In my case, I needed only Chrome.