There are 3 ways to do it Each methods has its own Pros and Cons Crass way , Subclassing container class and using templateProcessor->setComplexBlock templateProcessor->setComplexBlock will give Error, Uncaught Error: Class ‘PhpOffice\PhpWord\Writer\Word2007\Element\Section’ not found. That is why container subclass is used namespace PhpOffice\PhpWord\Writer\Word2007\Element; class Section extends Container{} and then $phpWord = new \PhpOffice\PhpWord\PhpWord();//$this->templateProcessor->makeTable();//new \PhpOffice\PhpWord\PhpWord(); $section…
TinyMCE Editor https://www.tiny.cloud/blog/ Latest versions(4+) ask for "Your Tiny API Key" Demo with version 3.4 Your API Key is a unique token that links your TinyMCE instances to your account. It grants you access to the Premium Features that you are subscribed to. To get Key word Register or Login Simplest Usage <!DOCTYPE html> <html>…
html-docx-js Demo with TinyMCE v3.5 This is a very small library that is capable of converting HTML documents to DOCX format thatis used by Microsoft Word 2007 and onward. It manages to perform the conversion in the browser byusing a feature called ‘altchunks’. In a nutshell, it allows embedding content in a different markuplanguage. We…
At times you may want to add code in blogspot(http://www.blogger.com). It can be done with the following steps PS:There are many other similar services. Google "Syntax highlighting in Blogspot" to get an entire list Steps Visit code highlighter : http://ajblk.github.io/SyntaxHighlightGenerator-v3.0/OnlineGenerator.html Paste the code, select "language" & "code" Click "Get Formatted HTML" Preview Code Add External…
To add an HTML file to your Apps Script project, follow these steps: https://developers.google.com/apps-script/guides/html Open the Apps Script editor. At the left, click Add a file add > HTML. <!DOCTYPE html> <html> <head> <base target="_top"> <script> function readSSContents() { //simply call a funcion in script var ssContents = google.script.run.myFunction() } function onSuccess(numUnread) { var div…
function insert_value(request,sheet){ var id = request.parameter.id; var country = request.parameter.name; var flag=1; var lr= sheet.getLastRow(); for(var i=1;i<=lr;i++){ var id1 = sheet.getRange(i, 2).getValue(); if(id1==id){ flag=0; var result="Id already exist.."; } } //add new row with recieved parameter from client if(flag==1){ var d = new Date(); var currentTime = d.toLocaleString(); var rowData = sheet.appendRow([currentTime,id,country]); var result="Insertion successful";…
To open New >> More >> Google App Script Rename **A google script file will have this basic function *** function doGetTest(e){ } sligtly alter it like function doGetTest(e){ if (e === undefined)e ={parameters:{}}// for running tests } To get the url variable passed use e.parameter; eg: var op = e.parameter.action; Create google Spreadsheet Instance…
Finding and replacing text with PHPWord https://stackoverflow.com/a/20220205 PHPWord is only intented to create docx files. Anyhow, a docx file is simply a collection of xml files in a zip container. In general what you need to do is: Rename xxx.docx to xxx.zip Unzip to a temporary folder In temporary_folder_from_unzipped_doc/word read in document.xml which contains all…
Preloader with Materialize https://materializecss.com/preloader.html HTML <div class="progress"> <div class="indeterminate"></div> </div>
https://materializecss.com/modals.html HTML <!– Modal Trigger –> <a class="waves-effect waves-light btn modal-trigger" href="#modal1">Modal</a> <!– Modal Structure –> <div id="modal1" class="modal"> <div class="modal-content"> <h4>Modal Header</h4> <p>A bunch of text</p> </div> <div class="modal-footer"> <a href="#!" class="modal-close waves-effect waves-green btn-flat">Agree</a> </div> </div> JS document.addEventListener('DOMContentLoaded', function() { var elems = document.querySelectorAll('.modal'); var instances = M.Modal.init(elems, options); }); // Or with…