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

[Feature Request] Expose "root" props of EditorView #202

Closed
noru opened this issue Oct 14, 2021 · 4 comments
Closed

[Feature Request] Expose "root" props of EditorView #202

noru opened this issue Oct 14, 2021 · 4 comments

Comments

@noru
Copy link
Contributor

noru commented Oct 14, 2021

Hi Maintainer,

Could you please expose "root" config of EditorView (https://codemirror.net/6/docs/ref/#view.EditorView.constructor^config.root)?

I'm using shadow dom in my case, without this config the whole style would go broken. And there is no workaround currently.

I've read the code, seems only container is exposed by useCodeMirror hook, sadly that's not sufficient for cases using shadow dom.

I would be happy to submit a PR for this request. Just drop me some guidance if needed. The simple change would be add a prop just like container, but it would be better to expose all configs of state/view for better customization.

@jaywcjlove
Copy link
Member

@noru Welcome to submit a PR, I can provide some help.

@jaywcjlove
Copy link
Member

return { state, setState, view, setView, container, setContainer };

@noru

@noru
Copy link
Contributor Author

noru commented Oct 15, 2021

hi @jaywcjlove, a PR(#204) is sent. appreciated your help!

jaywcjlove added a commit that referenced this issue Oct 15, 2021
@jaywcjlove
Copy link
Member

@noru Upgrade v4.1.0

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

No branches or pull requests

2 participants