Comment on page
Create
You can create any block by calling the method
new
with the corresponding block type - text, image, etc. - of the new block.new [block-type] with [ID]
The following arguments are optional and belong to the
[ID]
parameter:Example of creating a block embed with a text argument specifying the url:
new "embed" with "https://docs.fermat.ws"
- Dictionary argument - each block type may have more than these common properties which can be added as well:
position
← list: x and y coordinates.permalink-edit
← boolean: true if content is editable in permalink view, otherwise, false.size
← list: width and height in pixels.
Example of creating a block text with a dictionary argument specifying the content "Hello World" and position [100, 200]:
new "text" with {
"position" to [100,200]
"value" to "Hello World!"
}
Please, inspect blocks in Fermat or see block types for a detailed list of non-common properties (e.g. source in block-image).
Last modified 1yr ago