The Freeplane scripting API is an object oriented layer over the Freeplane internals.

It is meant to be upwards compatible and it grows with new Freeplane features. If you miss a special Freeplane feature in the API please create a change request in Mantis.

The Proxy interface

The interface is completely defined by the Proxy interface with its numerous subinterfaces.

In addition to the wrapper layer there are two extensions:

FreeplaneScriptBaseClass

This Groovy class is the base class of all formulas and Groovy scripts. It provides some methods you may find convenient.

Utilities

The following utility classes that also are listed in FreeplaneScriptBaseClass might be useful. Where available use the shortcut (e.g. ui instead of UITools) since this requires no imports:
ClassShortcut
UIToolsui
LogUtilslogger
HtmlUtilshtmlUtils
TextUtilstextUtils
MenuUtilsmenuUtils
ConfigPropertiesconfig
FreeplaneVersion-

Entry points

Each script is given two variables:
  Proxy.Node node
  Proxy.Controller c

In formulas and Groovy scripts all methods and properties of the node variable are directly available so you can write children.size() instead of node.children.size().

Access to Freeplane's internals

The existence of a comprehensive API doesn't prohibit access to internal interfaces. For most scripts this should not be necessary but especially add-on writers may need more than the scripting API. But note that these internal interfaces might change without further notice between two stable Freeplane versions (but probably not between minor versions). Also note that for understanding the internal interfaces you have to dive into the code. Setting up a proper development environment is therefore indispensable.