Shaishav is correct. You can use the TemplateUtilities in the Umbraco.Web.Templates namespace.
however, Field has been dropped in v8 according to what I read. So, instead I got this to work by using TemplateUtilities.ResolveMediaFromTextString instead.
Thanks Shaishav! I did not know about the TemplateUtilities. ;-)
You can also really shine it on by including some extra css which will add space at the top and bottom of the image so the image is not stuck to the text. Just reference a bootstrap class or make one like:
Responsive images in RTE?
Hello, so i have a little problem with the RTE and Images
Images aren't responsive in RTE, so is there a way to make them responsive with like a format or something? without adding any packages etc.
It would be amazing to be able to add a RTE format to a image. but it seems not to be working.
Kind regards/ Emil
Hi Emil,
Don't know exactly what you would like to see.
But to prevent large images in an RTE field from breaking the site layout, I use an additional style element.
provide the RTE field with a wrapper class such as '.content' or base it on the p-tag.
this way you prevent the image from being displayed too large.
Hi
You can try this solution and add class to img tag.
Hello!
Shaishav is correct. You can use the TemplateUtilities in the Umbraco.Web.Templates namespace.
however, Field has been dropped in v8 according to what I read. So, instead I got this to work by using TemplateUtilities.ResolveMediaFromTextString instead.
Thanks Shaishav! I did not know about the TemplateUtilities. ;-)
You can also really shine it on by including some extra css which will add space at the top and bottom of the image so the image is not stuck to the text. Just reference a bootstrap class or make one like:
(padding top and padding bottom with 10 spaces.)
Best, Daniel
is working on a reply...