Plugin: Script runner

Integration questions/issues
Post Reply
Posts: 33
Joined: Tue Jan 31, 2017 2:52 pm

Plugin: Script runner

Post by mus » Fri Feb 24, 2017 5:39 pm

Hey, here's my first plugin. I actually think it's useful for playing around with the features of docbuilder.

What is does:
When you hit "execute", any script you've entered in the text area gets executed.
It runs in word, spreadsheets and presentations (but the default script example provided is for the Word editor only).

Installing it:
* remove the .zip extension (this board doesnt allow .plugin attachments!?)
* In the desktop editor, just drag& drop it onto the main window. You will then find a plugin icon in the left sidebar.

I'm only getting started on what to do with the scripts, but the possibilities are great!

example code from the documentation:

Code: Select all

// example for a spreadsheet document

var oWorksheet = Api.GetActiveSheet();           // create a new 'oWorksheet' variable and get the created spreadsheet contents
oWorksheet.GetRange("A1").SetValue("Hello World");  // set the 'New cell' value to the A1 spreadsheet cell

// example for a presentation
var oPresentation = Api.GetPresentation();       // create a new 'oPresentation' variable and get the created presentation contents
var oSlide = oPresentation.GetSlideByIndex(0);   // get the first slide
oSlide.RemoveAllObjects();                       // remove all objects from the first slide
So far only tested on Onlyoffice Desktop for Mac.

I welcome your feedback.
(27.57 KiB) Downloaded 143 times

Posts: 1844
Joined: Tue Oct 11, 2016 2:34 pm

Re: Plugin: Script runner

Post by Maxim » Mon Feb 27, 2017 9:53 am

Hello mus!
It's very good to see your plugin!
We are really glad that you've created your own plugin!
I hope it will be useful for the others.

Post Reply