9

In addition to Milind's answer: it is not good practice to put html directly into the CEWP just because you can. For one, it will only work on some kinds of pages. Web part pages are fine, wiki pages will chew the html. Secondly, it will be hard to maintain, since you will need to edit the web part itself every time you want to make a change. As an ...


7

Edit the page in Advanced Mode (from Sharepoint Designer). If the button "Advance Mode" is grayed, you need to enable "Enable Detaching Pages from the Site Definition". You can find this setting on the site in the section "SharePoint Designer Settings" (http://site-name/_layouts/15/SharePointDesignerSettings.aspx) If this option is also disabled at site ...


7

Like Amal said, it's not easy with CSS, because FontAwesome already uses :before and :after. One possibility is to solve this with JavaScript on runtime. Try something like this: function AppendMenuFontAwesomeIcons() { var elements = document.querySelectorAll('ul[id^=zz][id$=_RootAspMenu] li span.menu-item-text'); for (var i = 0; i < elements....


7

There is a React Script Editor webpart that can enable this type of functionality: https://github.com/SharePoint/sp-dev-fx-webparts/tree/master/samples/react-script-editor However, if it is just some simple HTML/JS then a no framework SharePoint Framework webpart would be pretty simple to create. There is a learning curve (especially with toolsets), but ...


6

I don't know about you guys but on my CEWP if I do the following, I can enter an HR tag without moving to the html view: Type some dummy text Click the area where we want the line In the ribbon, pick Editing Tools > Format Text > Markup Styles > Horizontal Rule We can even customize the look and feel of the line with CSS using hr.ms-rteElement-Hr update: ...


6

If the chrome type does not help you, you can just add a blank space as title. Just tried it out and it works. It's a ugly way to do it, but it works.


6

Since you want to put this into a content editor you'll need to use the JavaScript Client Object Model. Here is something you can use as the source for a content editor that will ask you the list and field title, then let you click a button to create the field, adjust/expand on it as necessary: <script src="//ajax.aspnetcdn.com/ajax/jQuery/jquery-1.11.3....


6

You can implement this by creating a Custom New Form and adding the HTML you have already created to this aspx page. This will be bound to the SharePoint List . Each SharePoint List by default has NewForm.aspx,EditForm.aspx and a DisplayForm.aspx. If you open the SharePoint Designer you can view them as below: You can add a new Custom Form and set it as ...


6

Try the below CSS in Script Editor Web Part <style> .ms-core-listMenu-verticalBox > .ms-core-listMenu-root > LI > .ms-core-listMenu-item { font-weight:bold; } </style> [OutPut] By the way, the Content/Script Editor Web Part is not a solution to apply your CSS on all quick launch headers for all pages. It will be applied only on the ...


5

You can add script in Content Editor WP, to open the page as dialog, Load first SP.js and add following script ExecuteOrDelayUntilScriptLoaded(function () { var dialogurl = "your url"; var options = { url: dialogurl, width: 700, height: 700, dialogReturnValueCallback: OnDialogClose }; ...


5

As Pradip has already told the reason for this behaviour I won't repeat it here again. But there are a couple of things you can try. Have a look at this article, Inconvenient Content Query Web Part and server-relative URLs, which suggests - Another way to get around this issue is to use a Feature Receiver. After activating the Feature that provisions ...


5

There's a great solution which allows you to build a HTML form for SharePoint lists if you're okay using JavaScript and jQuery. Original solution: http://www.markrackley.net/2013/08/29/easy-custom-layouts-for-default-sharepoint-forms/ Updated this year: http://www.markrackley.net/2017/05/04/customize-your-sharepoint-classic-forms-without-infopath/


5

Content Editor web part is normally used to display the contents on the screen. In your case, you have HTML and jQuery code. So you have to format your code in proper HTML format and then paste it in content editor webpart. For example, Also you have to add $(document).ready(); into your code. Your final code should be <html> <head> ...


4

You can try by using Infopath. Please try steps given below: On the List tab of the ribbon, Click Customize form To make the attachment field required, we will add a dummy textbox control that will contain the required rule. To do this, add a textbox control and place it before the attachment field Right click on the textbox control, hover on ‘Rules’ and ...


4

If you enter a URL into the Content Editor Web Part as a relative link, the link converts to an absolute URL when the entry is saved. This automatic conversion can be an issue if you are deploying content from a staging environment to production, where absolute URLs reference the original server's name. To address this automatic conversion issue, You ...


4

Solution is explained here: ContentEditor WebPart Edit Permissions Permission "Add and Customize Pages - Add, change, or delete HTML pages or Web Part Pages, and edit the Web site using a Microsoft SharePoint Foundation-compatible editor." must be granted at site level. If you grant this permission only at page level, it won't work. So: Go to site ...


4

For adding user to group, instead of REST API I used JSOM, now I didn't get credentials pop up. :) Adding users to a group with JSOM using following code:: addUserToSharePointGroup: function (loginName, success, failure) { var _this = this; var clientContext = new SP.ClientContext.get_current(); var siteGroups = clientContext.get_web().get_siteGroups(...


4

Use out of the box object WPQ1FormCtx or WPQ2FormCtx. I have seen former in SharePoint Online and the later in SP2013 on prem. The property you are interested in is WPQ1FormCtx.ItemAttributes.FsObjType. If it is 1, the the object being edited is Folder. Attaching the screenshot from my SharePoint tenant. You can also refere to this link. Here I had used ...


4

The JS CSOM only operates on the site you are currently on (You can open another client context but you need a site URL to do so). It does not allow you to do any operations based on the webapp level. If you want to execute those statements you need to user other ways. A nice and simple approach would be to query the search via REST. You can apply a filter ...


4

@theChrisKent is correct. This is the very big trade off for many SharePoint admins & devs when considering whether or not to utilize modern pages in SharePoint. I just completed an on-prem to online migration and it was the very first thing I had to decide. We opted for a migration as opposed to an “upgrade”, thereby staying in the classic UI. The ...


3

These other answers tend to be too simple or way too complicated... ;) This should do what you want, you just might need to change the url variable and the select parameters to conform with your environment -- but I took my best guess based on the information you provided. You could also remove the jQuery reference if your page already has it. Here is a ...


3

If you are using the enterprise version and using the publishing features, there is a list that gets created automatically called Reusable Content. This allows you to create text/html snippets that can be used in any publishing html rich text fields or added via web part.


3

The options at your disposal depend on if you are running the Enterprise SKU or one of the supported O365 plans. Generally speaking - if you are using Page layouts you already have Publishing Features Enabled (however since we may also be talking about web part pages I'll cover both) You have the option to use the Design Manager functions for publishing ...


3

Assuming you mean the metro style icons then you can override the default CSS to make them a different colour. <style type='text/css'> div.ms-tileview-tile-content { background-color: red; } </style> Add a CEWP to a page and edit the source. Paste in the above and set the colour as you want it. I would also suggest you hide the CEWP.


3

Since in SharePoint 2013 CSOM API was introduced SP.Publishing.Navigation namespace, the following example demonstrates how to create a publishing page. How to create a publishing page via SharePoint 2013 JSOM function createPublishingPage(pageName,pageLayout) { var ctx = SP.ClientContext.get_current(); var pubWeb = SP.Publishing.PublishingWeb....


3

You can access the Site's Property Bag using the JavaScript Client Object Model. Here's a walkthrough: http://www.jeremythake.com/2013/10/using-the-sharepoint-csom-api-to-get-a-property-bag-value/


3

Using JSOM var clientContext = new SP.ClientContext(_spPageContextInfo.webServerRelativeUrl); var oFile = clientContext.get_web().getFileByServerRelativeUrl(_spPageContextInfo.serverRequestPath); var limitedWebPartManager = oFile.getLimitedWebPartManager(SP.WebParts.PersonalizationScope.shared); var collWebPart = limitedWebPartManager....


3

Did not try yet but know the trick using REST API. You have to send 20+ POST requests to the following URL /_api/web/lists(guid'Guid Id of your list')/fields Request body will be var data = { '__metadata': { 'type': 'SP.FieldText' }, 'FieldTypeKind': 2, 'Title': 'Project Name', 'MaxLength': '22' }; Update based on comment. ...


3

Edit your Web Part Properties and set Chrome equal None. That's all about hiding web part title.


3

I found out why - not good news https://support.office.com/en-ca/article/Content-Editor-Web-Part-c1350ff6-934c-4c2e-8e53-1ec3b548a0dc The Content Editor Web Part does not accept the HTML FORM element. If you need to add a Web Part that uses the FORM element, consider using the Page Viewer Web Part or the Form Web Part.


Only top voted, non community-wiki answers of a minimum length are eligible