-
Notifications
You must be signed in to change notification settings - Fork 146
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
Images edited in RichText Editor do not receive a valid URL #551
Comments
It sounds like a bug, but I haven't had tome to check it over yet. I expect that resizing is a TinyMCE editor feature that isn't being handled by the custom Cofoundry image integration. |
Ok so it looks like an HtmlSanitizer issue. The html editor is converting the edited image into a data uri, which is being saved but cannot be rendered because the default sanitizer ruleset doesn't allow data uris. If you resize using the drag handled in the editor then it works fine because it's just setting the width/height. You can fix this by customizing the HTML sanitizer ruleset, adding "data" to your ruleSet.PermittedSchemes = HtmlSanitizerDefaults
.AllowedSchemes
.Append("mailto")
.Append("data")
.ToImmutableHashSet(); The question is what should be the correct default behavior:
|
What I can say is that it only took the end user on the new test instance of cofoundry a few minutes to ask why the editor supported this feature, but wondered why it wasn't working. It was just a simple block element they were trying to use to format a short article on this page. Either the feature should be supported correctly or there should be a restriction that this is not supported and does not work correctly - or in the best case, it should not be offered as an option at all. |
Hi,
I've just started playing around with Cofoundry.
I installed the ImageSharp extension and created a view pages/blocks and uploaded some images.
I had a strange behavior that when uploading images without editing them, they are displayed in the content block.
When I edit an image, e.g. resize or crop it, the preview shows the newly edited image, but when I save the changes (close the editor), the image disappears. The img tag is still present in the HTML file, but without the URL.
In the preview, the url “blob:https://localhost:5001/” is used, but this is lost when saving.
Is there an error here or is further configuration required?
The text was updated successfully, but these errors were encountered: