Forum Discussion

MarkShnier__You's avatar
MarkShnier__You
Icon for Qrew Legend rankQrew Legend
3 years ago

How to size an Image which has been pasted into a Rich Text Data entry field,.

If I have an image was was pasted into a Rich Text (data entry) field, does any one know syntax for a Formula Rich Text field to control the size?

------------------------------
Mark Shnier (YQC)
mark.shnier@gmail.com
------------------------------
  • This worked.

    //An Image can be pasted into a Rich Text field. To resize the image you need to search and replace //the end of it which will be />, with this for a height of 70.
    // style="height: 70px;"/>
    // so the formula becomes


    var text PixelHeight = [my pixel height field];

    var text NewSuffix = " style=\"height: " & ToText($PixelHeight) & "px;\"/>";
    SearchAndReplace([Image], "/>",$NewSuffix)


    ------------------------------
    Mark Shnier (YQC)
    mark.shnier@gmail.com
    ------------------------------