{"id":111,"date":"2021-10-08T16:22:47","date_gmt":"2021-10-08T16:22:47","guid":{"rendered":"https:\/\/ouritsource.com\/blog\/?p=111"},"modified":"2021-10-15T17:26:04","modified_gmt":"2021-10-15T17:26:04","slug":"adding-a-custom-javascript-in-sharepoint-using-content-editor","status":"publish","type":"post","link":"https:\/\/ouritsource.com\/blog\/adding-a-custom-javascript-in-sharepoint-using-content-editor\/","title":{"rendered":"Adding a Custom JavaScript in SharePoint Using Content Editor"},"content":{"rendered":"<body>\n<p>Go to SharePoint Page and click onEDIT<strong>. <\/strong>\u00a0Once in Edit mode, click on the <strong>INSERT <\/strong>tab and add a <strong>Web Part.<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"590\" height=\"132\" src=\"https:\/\/i0.wp.com\/ouritsource.com\/blog\/wp-content\/uploads\/2021\/10\/image-29.png?resize=590%2C132&#038;ssl=1\" alt=\"\" class=\"wp-image-113\" loading=\"lazy\" srcset=\"https:\/\/i0.wp.com\/ouritsource.com\/blog\/wp-content\/uploads\/2021\/10\/image-29.png?w=590&amp;ssl=1 590w, https:\/\/i0.wp.com\/ouritsource.com\/blog\/wp-content\/uploads\/2021\/10\/image-29.png?resize=300%2C67&amp;ssl=1 300w\" sizes=\"auto, (max-width: 590px) 100vw, 590px\" \/><\/figure>\n\n\n\n<p>Under Categories, choose <strong>Media and Content<\/strong>.<\/p>\n\n\n\n<p>Under <strong>Parts<\/strong>, choose <strong>Content Editor.<\/strong><\/p>\n\n\n\n<p>Click on the <strong>Add <\/strong>button.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/ouritsource.com\/blog\/wp-content\/uploads\/2021\/10\/image-30.png?resize=640%2C141&#038;ssl=1\" alt=\"\" class=\"wp-image-114\" width=\"640\" height=\"141\" loading=\"lazy\" srcset=\"https:\/\/i0.wp.com\/ouritsource.com\/blog\/wp-content\/uploads\/2021\/10\/image-30.png?w=624&amp;ssl=1 624w, https:\/\/i0.wp.com\/ouritsource.com\/blog\/wp-content\/uploads\/2021\/10\/image-30.png?resize=300%2C66&amp;ssl=1 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/figure>\n\n\n\n<p>Go to the Content that was added and click on the down arrow to open the pop-up window. Click on <strong>Edit Web Part.<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"624\" height=\"138\" src=\"https:\/\/i0.wp.com\/ouritsource.com\/blog\/wp-content\/uploads\/2021\/10\/image-31.png?resize=624%2C138&#038;ssl=1\" alt=\"\" class=\"wp-image-115\" loading=\"lazy\" srcset=\"https:\/\/i0.wp.com\/ouritsource.com\/blog\/wp-content\/uploads\/2021\/10\/image-31.png?w=624&amp;ssl=1 624w, https:\/\/i0.wp.com\/ouritsource.com\/blog\/wp-content\/uploads\/2021\/10\/image-31.png?resize=300%2C66&amp;ssl=1 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/figure>\n\n\n\n<p>Click on <strong>Click here to add new content<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"624\" height=\"74\" src=\"https:\/\/i0.wp.com\/ouritsource.com\/blog\/wp-content\/uploads\/2021\/10\/image-32.png?resize=624%2C74&#038;ssl=1\" alt=\"\" class=\"wp-image-116\" loading=\"lazy\" srcset=\"https:\/\/i0.wp.com\/ouritsource.com\/blog\/wp-content\/uploads\/2021\/10\/image-32.png?w=624&amp;ssl=1 624w, https:\/\/i0.wp.com\/ouritsource.com\/blog\/wp-content\/uploads\/2021\/10\/image-32.png?resize=300%2C36&amp;ssl=1 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/ouritsource.com\/blog\/wp-content\/uploads\/2021\/10\/image-33.png?resize=640%2C64&#038;ssl=1\" alt=\"\" class=\"wp-image-117\" width=\"640\" height=\"64\" loading=\"lazy\" srcset=\"https:\/\/i0.wp.com\/ouritsource.com\/blog\/wp-content\/uploads\/2021\/10\/image-33.png?w=624&amp;ssl=1 624w, https:\/\/i0.wp.com\/ouritsource.com\/blog\/wp-content\/uploads\/2021\/10\/image-33.png?resize=300%2C30&amp;ssl=1 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/figure>\n\n\n\n<p>Type in your code then click on <strong>OK <\/strong>on lower-right part of window.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/ouritsource.com\/blog\/wp-content\/uploads\/2021\/10\/image-34.png?resize=640%2C307&#038;ssl=1\" alt=\"\" class=\"wp-image-118\" width=\"640\" height=\"307\" loading=\"lazy\" srcset=\"https:\/\/i0.wp.com\/ouritsource.com\/blog\/wp-content\/uploads\/2021\/10\/image-34.png?w=624&amp;ssl=1 624w, https:\/\/i0.wp.com\/ouritsource.com\/blog\/wp-content\/uploads\/2021\/10\/image-34.png?resize=300%2C144&amp;ssl=1 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/figure>\n\n\n\n<p>Save<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/ouritsource.com\/blog\/wp-content\/uploads\/2021\/10\/image-35.png?resize=640%2C41&#038;ssl=1\" alt=\"\" class=\"wp-image-119\" width=\"640\" height=\"41\" loading=\"lazy\" srcset=\"https:\/\/i0.wp.com\/ouritsource.com\/blog\/wp-content\/uploads\/2021\/10\/image-35.png?w=624&amp;ssl=1 624w, https:\/\/i0.wp.com\/ouritsource.com\/blog\/wp-content\/uploads\/2021\/10\/image-35.png?resize=300%2C19&amp;ssl=1 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/ouritsource.com\/blog\/wp-content\/uploads\/2021\/10\/image-36.png?resize=640%2C438&#038;ssl=1\" alt=\"\" class=\"wp-image-120\" width=\"640\" height=\"438\" loading=\"lazy\" srcset=\"https:\/\/i0.wp.com\/ouritsource.com\/blog\/wp-content\/uploads\/2021\/10\/image-36.png?w=624&amp;ssl=1 624w, https:\/\/i0.wp.com\/ouritsource.com\/blog\/wp-content\/uploads\/2021\/10\/image-36.png?resize=300%2C205&amp;ssl=1 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/figure>\n<\/body>","protected":false},"excerpt":{"rendered":"<p>Go to SharePoint Page and click onEDIT. \u00a0Once in Edit mode, click on the INSERT tab and add a Web Part. Under Categories, choose Media and Content. Under Parts, choose Content Editor&#8230;.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[5],"tags":[],"class_list":["post-111","post","type-post","status-publish","format-standard","hentry","category-java-script","no-thumbnail"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ouritsource.com\/blog\/wp-json\/wp\/v2\/posts\/111","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ouritsource.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ouritsource.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ouritsource.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ouritsource.com\/blog\/wp-json\/wp\/v2\/comments?post=111"}],"version-history":[{"count":2,"href":"https:\/\/ouritsource.com\/blog\/wp-json\/wp\/v2\/posts\/111\/revisions"}],"predecessor-version":[{"id":138,"href":"https:\/\/ouritsource.com\/blog\/wp-json\/wp\/v2\/posts\/111\/revisions\/138"}],"wp:attachment":[{"href":"https:\/\/ouritsource.com\/blog\/wp-json\/wp\/v2\/media?parent=111"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ouritsource.com\/blog\/wp-json\/wp\/v2\/categories?post=111"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ouritsource.com\/blog\/wp-json\/wp\/v2\/tags?post=111"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}