Integration
The two functions getContent() and setContentEditor(contentEditor) are required for working with the page-O-builder, as described in Implementation.
If you want to integrate the page-O-builder into your own project, you can also use the following functions.
setNewPage()
Removes the content of the page-O-builder that was set with setContentEditor() and sets the page-O-builder to "New Page".
setEditPage()
Sets the display of the page-O-builder from "preview" to "edit".
Example for set the page-O-builder to "New Page":
const pageBuilder = document.querySelector('page-o-builder');
pageBuilder.setNewPage();
pageBuilder.setEditPage();removeAttributeNoDate()
Removes the "no-data" attribute, displays the "Loading" symbol and sets the content of the page-O-builder to zero.
Example for loading an content:
const pageBuilder = document.querySelector('page-o-builder');
pageBuilder.removeAttributeNoDate();
const contentEditor = yourFunctionToGetThe_contentEditor();
pageBuilder.setContentEditor(contentEditor);
pageBuilder.setEditPage();