You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And it appears to me that this is a bit costly. Why run this every time any request (including AJAX!) requests are made. I am not sure if it slows it down in any way, but it seems a bit clumsy. Is there no way we can create a HTMLEditorConfig class and then simply insert this as the default?
What is also missing is any documentation on how to override these settings.
The text was updated successfully, but these errors were encountered:
One option here is to move this logic into an HTTP middleware class e.g. CwpHtmlEditorConfigMiddleware. This could check whether the path is admin or not before adding the config. It would still run for unrelated admin requests, but not on the frontend at least.
Fluent has a method to detect whether a request is frontend or not, which could be reused or even added to core:
I am having a look at this:
https://github.com/silverstripe/cwp/blob/master/_config.php#L14-L138
And it appears to me that this is a bit costly. Why run this every time any request (including AJAX!) requests are made. I am not sure if it slows it down in any way, but it seems a bit clumsy. Is there no way we can create a HTMLEditorConfig class and then simply insert this as the default?
What is also missing is any documentation on how to override these settings.
The text was updated successfully, but these errors were encountered: