Announcement

Collapse

Information Needed

See more
See less

C&P Designer Question

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • C&P Designer Question

    We're having an issue with some of the HTML attributes on images in C&P Designer. I'm not sure if this is something that Salesforce's HTML field coding is responsible for or something that C&P is doing.

    One of the supported HTML attributes in the Salesforce HTML field is width (according to the linked help article: https://help.salesforce.com/s/articl...tor.htm&type=5). However, if I add the HTML width attribute to an img tag and then switch back to visual view and then back to HTML view, it converts itself to a style tag with the width in the style tag. For example, <img href="" width=600> becomes <img href="" style="width: 600px;">. This happens even if I already declare the CSS style width parameter separately.

    Is there a way to force it to keep the HTML width attribute? Most email clients can handle the CSS width paramter, but some clients only respect the HTML width attribute, so our images look way out of proportion in those clients. Outlook for Windows is one such email client. Is there a way to work around this if we can't force it to use the HTML width attribute?

  • #2
    Good day @kwclick5

    Please note that it is not a C&P issue. We are using CKeditor from Salesforce and as you described it converts the HTML attributes itself to a style tag. There is no way we can force to keep the HTML attribute. However, there are two workarounds:
    1. Once you change the attribute in code (<img href="" width="600px">), without clicking the Source button you have to click on the Save button directly. This way, the attribute which you have defined will be remained saved until you again click on the source button.
    2. Or else, you have to resize the source image according to the width you want to define using any image editor before uploading it into CKeditor.
    Hope that helps.

    Regards,
    Click & Pledge Support Department

    On Salesforce? Help us by rating our app: Click & Pledge Donor Management on AppExchange

    Join us @ the educational webinars: https://clickandpledge.com/webinars/
    Live Support available Join between 3:00 - 3:30 p.m. ET Monday - Thursday: https://clickandpledge.com/webinars/
    Are you on Salesforce? Join us at the Power of Us Hub: https://powerofus.force.com/0F980000000CjpC

    Comment


    • #3
      Thanks for clarifying, I figured it was probably a Salesforce issue. But, it's very helpful to know that if I don't click the Source button, the HTML width will stay there. I didn't know that.

      Another workaround that I discovered (for anyone who comes across this post later), if you define a text formula field with your HTML code and include that formula field in the template, the HTML will be read as HTML when the email is sent. I have successfully done this to add a <style></style> section to my email (which isn't supported by CKeditor). That's what I was going to end up doing for the images if I couldn't figure out another way, but since we have so many different possible images, it would have been a lot of formula fields, so I'm glad I don't have to do that.

      Comment

      Working...
      X