Add inline CSS to image using Tiny MCE

Asked

Viewed 82 times

0

I’m using Tiny MCE for the customer to post on a website I’m developing. It works super well, the problem is that when you post an image on Tiny MCE, and change its size, it generates the following line:

<img src="source/imagem.jpg?14641" alt="" width="550" height="838">

And with that the image is not responsive, what it would need is for Tiny MCE to put a css inline in the image, to look like this:

<img src="source/imagem.jpg?14641" alt="" width="550" height="838" style="
    width: 100%; max-width: 550px; height: auto;">

Does anyone know if it’s possible?

  • Can you only add inline css? Or you can also do it in an external file?

1 answer

1


  • Interesting. But the only question is that I can not give a minimum measure for the photo right? Then just put max-width: 100% in the class?

  • ~vc can try to put 'img-Responsive' and another css tag of yours. but I think only this bootstrap tag if you are using solves.

  • Good, I’m not using bootstrap, but solved! Only then create this class.

  • is that almost everyone uses the bootstrap made thinking of it, but you can either use or make the class you want.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.