Jump to:

5450 Posts in 1672 Topics by 1197 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Responsive images and TinyMCE

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 428 Views
  • Spaghetti
    Avatar
    Community Member
    31 Posts

    Responsive images and TinyMCE Link to this post

    Hello,

    I've tried various techniques for responsive images but they all seem to focus on the template side (which is all well and good when you know what images will be on the page by design) and not the user-facing side, i.e. TinyMCE.

    I'm trying to achieve these things:

    - Stop SS from re-sampling my images, at all, without me asking it to.

    - Stop TinyMCE from adding specific widths and heights to my images.

    - Specify my images using custom markup, (so that I can use javasript like picturefill.js to lazy-load the correct image for the device).

    I have no idea how to do any of this. Can anyone help please?

    In the long-run I really think there needs to be some decent responsive images support built-in to Silverstripe, it's becoming more and more a part of what I do and I think in this day and age it's pretty essential.

  • zenmonkey
    Avatar
    Community Member
    524 Posts

    Re: Responsive images and TinyMCE Link to this post

    There are a couple of people working on this. The big problem is how TinyMCE is hacked to support the images. Take a look at the saveInto function in the HTMLEditorField, it's where the image resize function is called. You should also be able to oveload the tag there. I've been toying with the idea of overloading or subclassing it deal with the issue

    428 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.