netcarver Posted November 7, 2017 Posted November 7, 2017 A very simple textformatter that was inspired by Diogo's RemoveHeight textformatter. This one strips the height from any images and either adds a custom class or adds a max-width:100% as an embedded style. Github: https://github.com/netcarver/TextformatterFluidImages PW Repo: here. 9
szabesz Posted November 7, 2017 Posted November 7, 2017 Thanks for sharing! This module can be quite useful
netcarver Posted November 28, 2017 Author Posted November 28, 2017 Just updated to fix a side-effect of using the PHP Dom manipulation library - which was wrapping the content with an unwanted DOCTYPE and HTML start and end tags. This is a breaking change - so the version has been updated to 1.0.0. 1
adrian Posted November 28, 2017 Posted November 28, 2017 1 hour ago, netcarver said: Just updated to fix a side-effect of using the PHP Dom manipulation library - which was wrapping the content with an unwanted DOCTYPE and HTML start and end tags. This is a breaking change - so the version has been updated to 1.0.0. @netcarver - what about taking this approach instead of those replacements? https://stackoverflow.com/a/22490902/1524576 2
Thomas108 Posted May 13, 2018 Posted May 13, 2018 Hi there, I just installed textformatterfluidimages on a new site with the latest PW 3.0.98 and it doesn't work for me with images inserted by ckeditor. I tried with and without a custom class, but nothing happened, width remained and no class was given. Refreshed PW and browser cache. Am I missing something? Isn't this meant for ckeditor? Or do i need to call it somewhere? So far I just installed the module. Thanks for your help...
teppo Posted May 13, 2018 Posted May 13, 2018 @Thomas108: this is a Textformatter module, so you need to enable it via field settings: Setup > Fields > your-fieldname > Details > Textformatters.
netcarver Posted May 13, 2018 Author Posted May 13, 2018 @Thomas108 Like Teppo said, you need to add this formatter to the field you want it applied against. If you've already done that and configured the module settings to add the classes you want then it should be working. However: are you trying to combine Lazyload with CKEditor embedded images? If so, you are right, the current version of this Textformatter doesn't support LazyLoading - but I do have a version that does.
Thomas108 Posted May 13, 2018 Posted May 13, 2018 Thank you both, now it works. I haven't been doing any web work for 3 years and now have to get used to do things in pw again. ?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now