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

[dev] EditorView doesn't have an easy way to access Editor config elements #2828

Closed
sbromberger opened this issue Jun 20, 2022 · 1 comment
Closed

Comments

@sbromberger
Copy link
Contributor

Consider the case where you have an editor config item that is accessed from within an EditorView method.

Right now we're having to extract individual config items out of the editor config prior to it being altered in

let config = Arc::new(ArcSwap::from_pointee(config));
, and then we pass in the extracted items to a modified EditorView::new() function (with the params as arguments to new(), which means every time we want to add a new config item that is handled by an EditorView, we have to change the signature of this constructor).

Is it possible to pass (a reference to) the entire editor config to an EditorView so that we have access to config variables within EditorView methods?

@sbromberger
Copy link
Contributor Author

Turns out that the editor instance is present in render_view which allows it to be passed to other render functions, so we don't actually need it in EditorView.

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

Successfully merging a pull request may close this issue.

1 participant