Add webparts to list views on Modern lists in SharePoint 2019?

35270244 25 Reputation points
2023-03-31T18:36:34.3933333+00:00

In SharePoint 2013, we were able to add script webparts to a list view and I can't seem to find a way to do that on modern list view in SharePoint 2019? For example, we'd like to add a script webpart to always show the headers as you scroll down on larger lists. Do we have to create these as new pages or can we add a webpart or add code somehow directly to the list view?

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,865 questions
0 comments No comments
{count} vote

Accepted answer
  1. Haoyan Xue_MSFT 20,906 Reputation points Microsoft Vendor
    2023-04-03T01:55:53.0066667+00:00

    Hi @35270244

    Unfortunally, the script editor web part is not supported in modern SharePoint.

    Reference: https://support.microsoft.com/en-us/office/where-are-the-content-editor-and-script-editor-web-parts-in-sharepoint-ed6cc9ce-8b2a-480c-a655-1b9d7615cdbd
    If you want to a insert script only on single modern site page, you can use Modern script editor web part developed by community members.

    Check below links for script editor web parts (developed using SPFx):

    1. react-script-editor
    2. Modern CEWP by SPJS

    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.

    Reference: https://techcommunity.microsoft.com/t5/sharepoint-developer/insert-script-in-the-header-of-the-modern-page-sharepoint-online/m-p/2475866


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

0 additional answers

Sort by: Most helpful