Add inline CSS in the image using Tiny MCE

0

I'm using Tiny MCE for the client to post on a website I'm developing. It works super good, the problem is that when you put an image in 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 take was that Tiny MCE put an inline css 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?

    
asked by anonymous 25.05.2016 / 13:51

1 answer

1

In TinyMCE.ini add the following code:

image_dimensions: false,
         image_class_list: [
            {title: 'Responsive', value: 'img-responsive'}
        ]

You can also try to use some extra plugins like:

link

link

    
31.05.2016 / 21:28