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

Mount tox-silver-sink in custom div #5471

Closed
bigjpg opened this issue Mar 6, 2020 · 3 comments
Closed

Mount tox-silver-sink in custom div #5471

bigjpg opened this issue Mar 6, 2020 · 3 comments

Comments

@bigjpg
Copy link

bigjpg commented Mar 6, 2020

Currently tox-silver-sink gets added to the document body. Is it possible to configure it to attach somewhere else?

Specifically I want to added it to the shadow root of a custom component I am building (I know tinymce doesn't support shadow, but it kind of does in iframe mode, except for silver sink being in the wrong place);

@lnewson
Copy link
Contributor

lnewson commented Mar 8, 2020

@dgoogles no that's currently not possible sorry, as having the sink in variable locations drastically increases the complexity of the positioning logic. We already have an issue open for shadow dom support, so I've just marked this as a question since we probably won't allow it to be placed in a random location and instead would just need to add support to mount it within the shadow dom, should we add shadow dom support.

@lnewson lnewson closed this as completed Mar 8, 2020
@lostkeys
Copy link
Member

lostkeys commented Mar 9, 2020

@dgoogles Can you explain more about what you're trying to do by putting the sink in a shadow dom. Is it just the sink or the toolbars. The only thing I can imagine is that you want to containerize and scope custom css styles...

@bigjpg
Copy link
Author

bigjpg commented Mar 9, 2020

@lostkeys, yeah that's right. When a tinymce dialog opens, it gets appended to tox-silver-sink (which is in the body of the document) But we are installing the tinymce css styles from within our component, so they don't get applied. We could add the styles to the document but we hope to leverage the encapsulation of shadow dom. I realize there is more work to be done here, but it almost works!

I actually tried manually moving the tox-silver-sink node to within my shadow dom after it mounts and then styles are applied correctly, but that doesn't quite work as tinymce no longer thinks that its inBody().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants