• Hello,

    I’m sorry to disturb with that issue but I searched all over the web and didn’t find a fix:
    I encountered that issue with the text editor called trough a plugin and also writing a test post :

    trying to make some custom html formatting, I add a div tag with a class and a background-image. when I save and update the page, it doesn’t show the background-image. I tried with background-color and it worked, I can’t get why not with an image…

    When I add the style attribute through a debug tool in my browser (firebug), the whole style works so I guess there’s no problem with my code… here it is BTW :

    <div class="img-header-vendor" style="background-image: url('https://upload.wikimedia.org/wikipedia/commons/1/14/Panorama_puy_de_dome_sud.jpg'); overflow: auto; background-repeat: no-repeat;">test content</div>

    I can’t use CSS to add a background image because the place where I add this code is a custom piece of content for each vendor on my website so I need to customize also the background image…

    Using the Tinymce, the code remains and is not deleted or altered in the backend, it’s just the frontend doesn’t render it…

    I really am lost here and to be honest I’m not a developer so I need your help so bad!
    Thank you so much in advance and have a great day,
    Emilien

Viewing 2 replies - 1 through 2 (of 2 total)
  • I took your code as it is, opened up a new post, dropped it into the text editor and saved it draft and it pretty much worked as it is. The image was waaaay too big for the element so it only had the effect of making the background blue.

    Thread Starter emiliengerbois

    (@emiliengerbois)

    Hi martcol and thank you for your quick answer!

    I get it is too big and had it adjusted with some CSS, but I can’t explain why I can’t see anything when applying this piece of code on my website, either in a post or through a plugin calling wp editor … any idea about what could happen?

    if I load the page with firebug, the div appears with its class but no style attribute when I have background-image inside of it …

    Thank you again and have a nice day,
    Emilien

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Text editor doesn't render background-image inline style attribute’ is closed to new replies.