Skip to main content

Posts

Showing posts from October, 2016

Show confirmation message on click of save in OOB list forms in SharePoint

Show confirmation message on click of save in OOB list forms in SharePoint, add the below script in each OOB list form page. <script type="text/javascript" language="javascript" src="/sites/dev/Style%20Library/Scripts/jquery-3.1.0.min.js"></script> <script type="text/javascript"> function PreSaveAction() {   if($('[id*="Update"]').is(':checked')){ return (confirm("This item has value of Update as “Yes”. Are you sure you want to save this item?")); } else{ return true; } } </script>

Bind a html string with Enhanced rich text box which has heavy formatting in O365 using Angular JS

Bind a html string with Enhanced rich text box which has heavy formatting in O365 using Angular JS , below solution did the trick. You have to use  $sce.trustAsHtml() , to use it directly into the DOM, you could do it like this, JS/controller part: Ref:  http://stackoverflow.com/questions/21503588/angularjs-bind-html-string-with-custom-style $scope . trustAsHtml = function ( string ) { return $sce . trustAsHtml ( string ); }; And in DOM/HTML part <div data-ng-bind-html = "trustAsHtml(htmlString)" ></div>