Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1438996

    Hello, when I put an svg in a text block, in the advanced editor preview its width is through the whole browser, even though in the text block editor I have a set width. Any way to remedy this?

    View post on imgur.com

    Thank you

    #1439004

    this is due to the fact that some svg code do only have viewBox dimensions and no internal width and height information.
    those svgs are handled as if they have width and height : 0x0

    So on avia-builder.css there is a rule :

    /* @since 5.6.9    make sure that svg is visible in backend - needs to add logic for frontend !!!  */
    #avia_builder img[src*=".svg"],
    .wp-admin .avia-modal img[src*=".svg"] {
    	width: 1500px;
    }

    that makes all svg visible on backend. For example – very important for image with hotspots. Image ALB Elements etc.

    so maybe it would be better to exclude those svg inside avia_textblock and replace that rule above by:
    ( because on text_block the images do get width and height information by tiny-mce editor.)

    #avia_builder div:not(.avia_textblock) > img[src*=".svg"], 
    .wp-admin .avia-modal div:not(.avia_textblock) > img[src*=".svg"] {
    	width: 1500px;
    }

    but that had to be done in that original file and should be best implemented to enfold in next version.

    #1439007

    Thank you, looks good now.

    #1439013

    Hi,

    Thanks for helping out @guenni007 :-)

    Best regards,
    Rikard

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.