Sharepoint 2013 Deleting Contents of <Style> in Embed Code When Saving

Removing the big title atop of a SharePoint page

Approach 1 (Works for all pages , however your site will not have a Title, the links will be not be having user friendly name in site navigation ! ) - Personally not recommended

  1. Navigate to Site Settings.
  2. Under Look and Feel , click on the link
    Title , description and logo.
  3. Make the Title Empty, Click ok .This will essentially make your site Title empty.

Approach 2 ( Works on only the page you want the title to be hidden)

  1. Edit the page
  2. Add a Content Editor Webpart / Script Editor Webpart
  3. Add the following code inside webpart

< style>    #DeltaPlaceHolderPageTitleInTitleArea {    display: none;    }    < /style>

Creating a Custom Content Editor WebPart in SharePoint 2013

Ok guys! Many thanks for your help. I found several articles regarding creating a custom SharePoint 'Custom Content Editor' web part using Visual Studio 2013 and SharePoint 2013 Enterprise. These artcles are somewhat old but we can use them for our purpose.
I will post the URLs for those articles.

Creating a Custom Web Part Editor in SharePoint 2010

Custom Content Editor Web Part for SharePoint

adding/ changing css in Iframe page

Place the following in the page after the iframe

<script>
document.getElementById("myframe").contentDocument.getElementById("globalNavBox").style.display="none";
</script>

Simple Sharepoint 2013 Java Script in Content Editor

The easiest way to do it would be to assign each link an ID so that you can assign them to variables in the JavaScript, and then modify the href property of each link. From there you can either hard code them or load via AJAX. Here is how to hard code them.

HTML

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<title></title>
<script type="text/javascript">
/*These variables allow you to reference and manipulate the specfic DOM elements
(ie. the a tags we gave ID's of link1 and link2)*/
var link1 = document.getElementById('link1'),
link2 = document.getElementById('link2');

link1.href = 'http://example.com/Pages';
link2.href = 'http://example.com/Documents';
</script>
</head>
<body>
<a id="link1" href="">Click Here</a> for pages.<a id="link2" href="">Click Here</a> for Documents.
</body>

EDIT: I threw the script into a script tag inside of the HTML. Not sure if that's what you were asking but this is how to integrate them together. Here is a live example:
https://jsfiddle.net/h1b4a3gb/

Displaying code snippets in Sharepoint wiki

I found hilite.me which produces html styled code which you can insert into a sharpoint wiki.

It supports a number of languages and styles and is an online app.

Hide header of Sharepoint custom list displayed in iframe

You could try below jQuery script, I just hide suiteBarTop in demo.

<iframe id="myiframe" width="1400" height="600" id="DlgFramee" class="ms-dlgFrame" frameborder="0" src="/sites/tst/SitePages/Home.aspx"></iframe>

<script type="text/javascript" src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script type="text/javascript">
$(function () {
$('#myiframe').load(function () {
$(this).contents().find('#suiteBarTop').hide();
});

})
</script>


Related Topics



Leave a reply



Submit