Is there any way to format text in SharePoint image captions?

Anonymous
2025-01-17T18:37:43+00:00

Is there any way to apply standard formatting, such as italics or font color, to captions on images in SharePoint pages? I am more interested in this for images placed in Text web parts, but I also can't format caption text for the Image web part.

Microsoft 365 and Office | SharePoint | For education | MacOS

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
Answer accepted by question author
Anonymous
2025-02-08T06:08:32+00:00

Dear James,

Yes, you are right.

Based on my test, custom script needs to be enabled for the Embed web part with HTML code. The administrator can enable it every 24 hours via SharePoint Online Management Shell. Set-SPOSite https://contoso.sharepoint.com/sites/sitename -DenyAddAndCustomizePages 0

The SPFX solution is the alternative way of the custom script. It runs within the SharePoint Framework and doesn't rely on the custom script settings for its execution.

@Webbrewers, there may be no specific article about that currently. Similarly, you can see the detailed information about the SPFX part in Security considerations of allowing custom script - SharePoint in Microsoft 365 | Microsoft Learn.

Thank you for your time and effort.

Sincerely

Cliff | Microsoft Community Moderator

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

28 additional answers

Sort by: Oldest
  1. Anonymous
    2025-02-04T20:41:19+00:00

    Ah, good to know. I would assume that access to managing that app catalog (/sites/apps/) is limited to tenant admins.

    I've not used it, obviously, but apparently Microsoft added a couple of years ago the possibility of having an app catalog that is specific to a site collection:

    https://learn.microsoft.com/en-us/sharepoint/dev/general-development/site-collection-app-catalog

    I thought that it might be possible for a site collection owner to manage that, without needing admin permissions.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2025-02-05T07:10:08+00:00

    Dear James,

    Thanks for your updates and kindness.

    I'm afraid that you still need the admin right to create a site collection app catalog first with SharePoint Online Management Shell.

    Use the site collection app catalog | Microsoft Learn

    If you can find the administrator, you can let him create a catalog first and then the site owner can deploy the SPFX solution there to insert any code not only limited to HTML.

    Thank you for your time and effort.

    Sincerely

    Cliff | Microsoft Community Moderator

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2025-02-05T19:41:54+00:00

    @Cliff: I've determined that my organization does not currently allow "custom script" on SharePoint sites. They are now evaluating the possibility of allowing it (in response to my request, based on this thread). However, they are concerned about security and accessibility problems that it could open up.

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2025-02-06T06:36:09+00:00

    Dear James,

    Thanks for your updates.

    For security considerations of allowing custom script, the feature is disabled by default. It can be temporarily enabled for some custom solutions existing in some tenants.

    Based on the following article, the alternative way of the custom script is the SPFX solution. It seems that you can contact the administrator in your organization. If yes, you can let them deploy the SPFX solution in your environment to see the result.

    Security considerations of allowing custom script - SharePoint in Microsoft 365 | Microsoft Learn

    Thank you for your time and effort.

    Sincerely

    Cliff | Microsoft Community Moderator

    Was this answer helpful?

    0 comments No comments