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

AssetEditor pretty much not extensible #2585

Open
kitsunet opened this issue Nov 21, 2019 · 2 comments
Open

AssetEditor pretty much not extensible #2585

kitsunet opened this issue Nov 21, 2019 · 2 comments

Comments

@kitsunet
Copy link
Member

Due to the internal structure of the AssetEditor you cannot extend it (compared to eg. the ImageEditor) because the render method calls two sub methods that reset the scope to the original implementation and overwriting those is out of the question because the respectively needed components are not available to the outside. Therefore you are stuck with the default AssetEditor or rewriting a new one from scratch.

@dimaip
Copy link
Contributor

dimaip commented Nov 25, 2019

Could you expand a bit more on how you are trying to extend it?
Do you mean extending the class? In that case it's definitely not the idiomatic way to do it in JS land. E.g. if we wrote those components today we would not be using classes at all but rather use pure functions + hooks.
The way we handled extensibility until now was breaking up things into components (or other things like functions) and putting those components into the registry.

@kitsunet
Copy link
Member Author

Well, I am going with what I have at the moment. I wanted to extend functionality of the media browser and asset search, which means exchanging the secondary editor opener and the asset search endpoint. Currently there is no sensible way of doing that even with extending the class.

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