Issue

When you save HTML code containing an image tag in a Multiple Lines of Text column, and you've integrated the list or library with a SmartForm, the image doesn't display.

Image

Image

Cause

When SharePoint saves the HTML code with an image tag, it removes your absolute URLs and makes them relative to the SharePoint site. SmartForms are hosted on the K2 server which, because it has a different URL than the SharePoint server, cannot render the image in the SmartForm.

The Rich Text control is used on the SmartForm and will correctly show and edit HTML it is provided. To prevent SharePoint from changing absolute URLs into relative ones, change the text mode on the column in SharePoint. The below example illustrates the issue and solution.

  1. Create a custom list in SharePoint and add a new column which is a Multiple Lines of Text type and an Enhanced rich text (Rich text with pictures, tables, and hyperlinks) type.
    Image
  2. Add HTML which contains an image tag to the Multiple Lines of Text column. Notice the image doesn't render.
    Image
  3. Integrate the custom list with K2 for SharePoint and select the Create SmartForms option only.
    Image
  4. The image renders correctly in the custom list but when you view the Display and Edit SmartForms the image doesn't render.
    Image
    Image
    Image
  5. Open the List Settings page and change the type from Enhanced rich text (Rich Text with pictures, table, and hyperlinks) to Plain Text.
    Image
  6. On the portal.denallix.com says page, click OK.
    Image
  7. The image HTML is displayed as plain text on the list view but the on the Display and Edit SmartForms, the image renders correctly.
    Image
    Image
    Image
  8. To correct the rendering issue on your list view, following the steps in the next workaround.

SharePoint cannont render the HTML in a list view when the Multple Lines of Text column is configured in Plain Text mode. The below example illustrates the issue and solution.

  1. Edit your list view and add a new Multiple Lines of Text column and select the Enhanced Rich Text type.
    Image
  2. Modify the list view to show the new Multiple Lines of text column and hide the original column.
    Image
  3. Open the K2 Application page of your list view and click Regenerate SmartObjects.
    Image
  4. On the list view's K2 application page, check out and edit the New [List View Name] view.
    Image
  5. Open the Rules tab and edit the When Save Button is Clicked rule.
    Image
  6. On the Rule Designer page, click (configure).
    Image
  7. On the Execute the Create List Item Method page, drag the Company Logo Text Area property to the Company Logo (List View) input property. Click Finish.
    Image
  8. Save and check in the New [List View Name] view.
  9. Repeat the steps 4 to 8 on the Edit [List View Name] view.
  10. When you add a new item or edit and existing item on your list view, the logo renders correctly on the list view as they do on the SmartForms.
    Image