1

In Modern SharePoint there is no more HTML webpart.

Reason i am on the lookout for a HTML like webpart is:

i have tried inserting "Quickparts", "Button" "Hero", "Text" (with a table id edit mode), etc

None of theese can satisfy the need of my focus group.

They would like to have Buttons but they very much dislike all the options shown. Partly because of how much space a Button webpart takes up an partly because if i just insert a plain old Table they say it looks like its 1995.

So is there any way open for me where i can model a webpart, infuse it with buttons where it doesnt take all of my screen.

What I need is 3 columns x 4 rows table where i can cram my buttons and on top of my columns space enough to write the categories (That respesent the columns)

---------- EDIT ------------

so i tred looking at that script editor but im a total beginner and have no idea what it takes to get that file and permission from GitHub that you suggesed Adam.

Instead i found this

I got pretty much to the end of the steps but when i tried doing the @htmlToInsert part with my code Powershell starter crapping out on me saying:

The term '<' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

and

The ampersand (&) character is not allowed. The & operator is reserved for future use; wrap an ampersand in double quotation marks ("&") to pass it as part of a string. + CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException + FullyQualifiedErrorId : UnexpectedToken

and stuff like that so i am completely stuck.

Only other way for me to continue is to somehow figure out if i can read from a HTML file that also contains some CSS and then pass it along in powershell as an argument using a variation of the following:

Add-PnPClientSideText -Page home.aspx -Text $htmlToInject -Section 1 -Column 1 -Order 1

where i somehow can substitute $htmlToInject wih a html document path.

Anybody got any solutions now?

1
  • 1
    You can develop your own custom SPfx webpart which will fulfill all your requirements. Aug 17 '20 at 13:17
1

Maybe you could try to use react-script-editor. It would seem that you may use any kind of html with style and scripts in this webpart so you may create any kind of view that will meet your needs

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.