Skip to content
This repository has been archived by the owner on Feb 4, 2021. It is now read-only.
JohnMcLear edited this page Dec 3, 2014 · 6 revisions

This plugin exposes an API endpoint at /pluginAPI/

The name space is customStyles, the class is styles and each method is the final value IE allStyles is a method.

An example request might look like this:

http://127.0.0.1:9001/pluginAPI/customStyles.styles.allStyles?apikey=lulzthisismyapikey

Namespace = customStyles Class = styles Method = allStyles

The apikey is the same one you already use for your Etherpad instance so just use that :)

#Methods

##new Creates a new Style Required Parameters styleId (string), css (string) Optional Parameters padId (string)

##update Updates an existing Style Required Parameters styleId (string), css (string)

##globalDisable Disables a style globally Required Parameters styleId (string)

##disable Disables a style on a pad Required Parameters styleId (string), padId (string)

##delete Deletes a style Required Parameters styleId (string)

##get Gets a styles CSS Required Parameters styleId (string)

##stylesForPad Get the styleIds associated to a padId Required Parameters padId (string)

##setStylesForPad Set the StyleIds associated to a padId Required Parameters padId (string), styleIds [array] Example GET request http://127.0.0.1:9001/pluginAPI/customStyles.styles.setStylesForPad?padId=test&styleIds=["style1", "style2"]&apikey=ohhai

##allStyles Get all Styles available on the Etherpad Instance

##disabledStyles Get all the disabled Styles on the Etherpad Instance

Clone this wiki locally