0:02 hello and welcome to another point a
0:05 youtube channel i am bj a microsoft MVP
0:07 and in this video i am going to explain
0:10 how we can use script editor webpart in
0:15 SharePoint Online 2013 2016 or 2019 as
0:18 well so we'll see first we will create a
0:20 web part page and then we'll see how we
0:23 can add this script editor a part in the
0:25 sharepoint online chats or serpent same
0:28 way you can add it to sharepoint 2016 or
0:31 2019 sets remember we'll be able to add
0:33 only into the SharePoint classic sites
0:35 in the modern Church will not be able to
0:38 add any script editor web part we cannot
0:41 do any kind of script injecting by using
0:44 script or content editor web part so
0:45 first of all what is this script editor
0:49 web part in before to SharePoint 2013
0:52 and SharePoint 2010 and there were since
0:54 there was a content editor of a part
0:57 which we can use to inject script into
0:59 the page either you can refer it through
1:02 an external file which you can upload to
1:04 site asset or somewhere and then you can
1:06 upload into that you can give the
1:08 reference in the content editor of a
1:11 part but then in SharePoint 2013 script
1:13 editor Microsoft introduced script
1:15 editor where you can inject your where
1:17 you can put your HTML and your scripts
1:21 in that page in that paper to the script
1:22 editor web part and then finally you can
1:25 add that in that page so first what
1:27 we'll do is I'll open my SharePoint site
1:31 and then I will add I will create a web
1:33 part page so you can see here this is my
1:35 home page I will go to view all pages in
1:39 the vol pages I'll are a web part there
1:43 so if you'll see I'll create file then
1:45 new and then this is the web part page
1:48 so click on that then we will be able to
1:52 also a part base there so first what I
1:55 will do is I will I'll add I'll give you
1:58 a name for that suppose I will say
2:05 scraped editor demo and I will choose
2:07 this header footer and three column
2:09 layout you can choose the there are
2:10 different layouts are there you can
2:12 choose but I will choose this header
2:13 footer and
2:15 a column layout and then where we want
2:19 to store we want to store this on site
2:23 pages will store it and then click on
2:25 create so once you click on create it
2:28 will create a webpart page so in that
2:30 way part page you will see how we can
2:32 add the script editor apart so this is
2:34 the page which you have created it is
2:37 opening on the edit mode click on this
2:40 add a webpart link on any of the web
2:42 pads own you can add it I am just adding
2:45 in the hero Joe so once you add once you
2:47 click on that so it will open your pad
2:50 categories so you can see here this is
2:52 our purgatory categories under median
2:55 content you can see script editor is
2:59 there so click on add and now your
3:00 script editor web part will be added to
3:03 this header zone so now you'll see here
3:06 this is your script editor a path added
3:09 and without going to that properties you
3:11 can just click on edit snippet and it
3:14 will come up with a screen where you'll
3:17 be able to add your will be able to add
3:21 your HTML and your script code as well
3:25 so as I said you know we can write your
3:28 HTML tag also suppose I'll write on HTML
3:31 tag which will start with you h2 tag so
3:34 I'll put that in turn and then here I'll
3:40 write let's say script editor web part
3:45 demo and after that what I'll do is I'll
3:47 just take a button and I'll click up
3:50 that button we will try to display our
3:53 alert box on that so if you'll see here
3:55 this is whatever the HTML things will be
3:58 there it will you can you'll be able to
4:00 see it here now I'll take a button show
4:04 I'll take that button and I'll say on
4:09 click and in that one click I'll call a
4:12 function so I'll called suppose this is
4:16 my function and I will do the close
4:19 bracket and I'll have this tag I will
4:23 put the end button tag and will give a
4:26 text message here suppose I'll say click here
4:27 here
4:30 so now you'll see here the this the
4:33 button is appearing over here in this
4:35 page you can see it now we will write
4:38 our function which is your my function
4:40 this is our function name so I'll write
4:43 in in charge script X I'll put a script
4:46 tag first of all and I'll in the script
4:51 tag within that I'll I'll declare my
4:55 function so I will say function and then
4:58 this is your my function I will put this
5:02 this brackets and then I will put an
5:11 alert here so alert I will put a message
5:18 suppose you clicked on the button so
5:23 this is our code so we can semicolon
5:26 then in short this I will click on in
5:30 short and then it will save that so now
5:32 I'll stop editing the page so you can
5:35 see here this is your page and I will
5:37 click on that and you can see here it is
5:39 displaying the message so this way you
5:41 will be able to our script injured
5:43 script into that lot of time what
5:45 happened is if you do not see this
5:49 script editor webpart in the Edit Page
5:51 so when you'll add your part if you do
5:54 not see that then you just go to your
5:57 admin Center serpent admin Center and in
5:59 that air main shelter we need to enable
6:04 that you know custom script which we are
6:06 adding there we need to enable that so
6:09 let me just open myself point arm in
6:12 center you can also directly access your
6:15 tenant name - admin URL and then if
6:17 you'll see here there will be a settings
6:20 is there in the left side you can see in
6:23 the left side in the settings if you go
6:25 down you will see a custom script over there
6:26 there
6:29 so if will come down you can see this
6:32 custom scripts and some section so you
6:34 can make allow easier to run the script
6:37 so both the things you can do that both
6:41 the things and once it is done then
6:43 it will take if it is by default it will
6:46 be in prevent prevent will be selected
6:48 so you allow both the things and click
6:51 on ok sometimes you take up to 24 hours
6:53 to reflect that but usually you will get
6:57 it in 3-4 hours and there were other web
7:00 parts will be available on that so you
7:01 know hopefully you learned something on
7:03 this script editor of a part which you
7:05 can use in the same way you can use in
7:09 SharePoint 2013 2016 and 2019 as well
7:11 but you can use on the classic sir punch
7:14 it's not your modern SharePoint site so
7:15 if you really like your videos subscribe
7:18 to our youtube channel and you will get
7:19 a lot of updates or a lot of video
7:21 tutorials on various serpent literate