Giter Site home page Giter Site logo

endersaka / gas-copy-gdocs-paragraph-style Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 1.92 MB

Experiments to copy a Google Docs paragraph style to another paragraph.

License: MIT License

JavaScript 99.20% HTML 0.80%
gas google google-apps-script google-docs google-docs-api

gas-copy-gdocs-paragraph-style's Introduction

Copy Google Docs paragraph style to another paragraph

Experimentations

This scope of this project is to explore the limits and the boundaries of by GSuite and Google Apps Script (GAS).

Everything started from the need to copy a paragraph style (line height, indentation, rulers, before and after paragraph spacing) to another paragraph.

It turns out that it is not so easy because GSuite do not expose any event handling facility. Just menus and dialog boxes or sidebar. There is no way to respond to a selection event even if in this case I tried a hack just to learn a bit more about security and CORS and see how Browsers behave.

Install and usage

To install this setup (that is good also for other GAS projects) you just have to clone this repository on your computer. Something like:

git clone https://github.com/endersaka/gas-copy-gdocs-paragraph-style.git name_of_the_new_destination_directory`

or

git clone [email protected]:endersaka/gas-copy-gdocs-paragraph-style.git name_of_the_new_destination_directory

Then you just need to install the Node.js modules.

npm install

Finally to build run:

npm run build

There are other three NPM scripts configured in package.json.

  • upload - to upload the dist directory content to your GAS project on the server.

  • deploy - to build and upload in a single step.

  • deploy:prod - same as deploy but with Webpack mode property set to 'production'.

Troubleshoting

If you get an error like the one described in this issue webpack-contrib/eslint-loader#306 you can find a temporary solution at the end of the issue report.

The first line of the error looks like:

ERROR in ./src/index.js
Module build failed (from ./node_modules/eslint-loader/dist/cjs.js):
TypeError: Cannot read property '0' of undefined

gas-copy-gdocs-paragraph-style's People

Contributors

endersaka avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.