-
Notifications
You must be signed in to change notification settings - Fork 1
MainPageEditor
The main page of the editor has all of the links to core and project editor functionality plus some real-time server information. Using the API you can add links or raw HTML code to various blocks. You can also set the block titles.
There are nine blocks in the main page: top, center blocks 1-4, middle blocks 1-3 and bottom. Each of these has a unique identifier.
Adding links to blocks is done with MainEditCore.add()
method call.
Example usage (should be called in a module constructor):
public function new(s: ServerTest)
{
// ...
server.coreMainModule.add(MAIN_TOP,
{ a: "core/calendar.list", text: "Calendar" });
}
Replacing links in blocks is done with MainEditCore.replace()
method call.
Example usage (should be called in a module constructor):
public function new(s: ServerTest)
{
// ...
server.coreMainModule.replace(MAIN_TOP,
{ a: "core/calendar.list", text: "Calendar" });
}
Adding HTML code to blocks is done with MainEditCore.addHTML()
method call.
Example usage:
public function new(s: ServerTest)
{
// ...
server.coreMainModule.addHTML(MAIN_BLOCK3, "<b>test html code</b>");
}
Setting the block title is done with MainEditCore.setTitle()
method call. Only center blocks 1-3 have separate editable titles.
Example usage:
public function new(s: ServerTest)
{
// ...
server.coreMainModule.setTitle(MAIN_BLOCK3, "BLOCK TITLE");
}