12

For testing purposes, try putting your html file in a document library in your portal and reference it in the CEWP from there. Eg: http://my.portal.org/Shared Documents/myfile.html If this works, then I am guessing it is an authentication issue. Try replicating the issue in Firefox. If it is indeed an authentication issue, you will be prompted for ...


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 ...


8

Yes you can. The contents of a Content Editor Web Part (CEWP) are stored like any other web part - in the web part properties. You can see this if you Export the web parts .dwp file and open in a text editor, you will get something like <?xml version="1.0" encoding="utf-8"?> <WebPart xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:...


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....


6

I found Amal Hashim's blog post: Javascript Detect SharePoint Page In Edit Mode There are different approaches for pages, wikis and publishing pages. I combined them into one helper function: function isEditMode() { var publishingEdit = window.g_disableCheckoutInEditMode, form = document.forms[MSOWebPartPageFormName], input = form....


6

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 ...


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

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

Customisations to the Data Sheet View are not supported, as this is generated using the Microsoft Office Access Web Datasheet Component, which renders the grid using the same base engine as the data sheet view that Microsoft Access uses.


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

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.


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

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 ...


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

Basically, it can be done with css with header and table changing: .s4-wpTopTable { background: #FEE; } .ms-WPHeader { background: #FEE; } If you want to apply this to particular web-part, you can add additional css-marker class on you web-part render methods to find you web part instance later or use js/jQuery-client bases techniques to apply/change ...


4

you need to place quotes around the url and a semicolon: var stringURL = "http://mydomain.com/Sandbox/bitest/_vti_bin/ListData.svc/Produce";


4

Note that height 100% means take up 100% of the height of the parent element which may have a static height set and not use the whole page. You can use F12 on IE to bring up the developer toolbar to track down which parent element is limiting the height. Then create a script and/or CSS style to override the specified height like what was done here Setting ...


4

For this you can use the Chart.js At first create a canvas Element: <canvas id="myChart" width="400" height="400"></canvas> Then parse your list for example with REST with jQuery: var urlQuery = "https://www.url.i/site/_vti_bin/ListData.svc/ListA"; var teamA = 0; var teamB = 0; var teamC = 0; $.getJSON(urlQuery,function(data) { $.each(...


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

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 ...


3

Why are you combining jQuery and old-fashioned IE-only DOM code? Try this: <script type="text/javascript" language="javascript"> function CurrentReport() { var link = $(".ms-vb-icon:first a").attr("href"); return "https://intra.sse.gov.on.ca" + link; } $(document).ready(function(){ $("#EPMReport").attr("src",CurrentReport()); ...


3

Although this post is quite old, this answer might help the ones who are searching for this functionality. In a list view grouped by Status column, where Active status should be expanded and Closes Status should be collapsed: Using IE developer tools or Mozilla Firebug, locate the (html element) image ID for the collapse-expand image (the '-' image). You'll ...


3

Why not put an HTML element into your CEWP: <div id="myDiv" /> and instead of document.write(), use something like: document.getElementById("myDiv").innerText = "my message"; Note that this might have problems with multiple instances of the web part on one page (i.e. multiple elements with id 'myDiv')


3

You would need to store that content in a Document Library somewhere and simply use the Content Link to point to that .js file from the Document library. It is some kind of security measure introduced in the SharePoint 2010


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 ...


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