Discussions

 View Only
Expand all | Collapse all

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

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

    Posted 05-18-2022 18:36
    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
    ------------------------------


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

    Posted 05-19-2022 06:54
    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
    ------------------------------