All 8 blocks are documented below, including compatibility blocks and blocks available through optional features. Select a block to read its behavior, arguments, default values, and menu choices. Each block has a permanent link.
parse HTML [TEXT] as document [NAME]
Parse HTML into a target-local named document tree. This does not sanitize HTML.
Block type: COMMAND. Opcode: parseHtml. Permanent link
| Argument | Type | Default value | Menu choices |
|---|
TEXT | STRING | <p>Hello</p> | |
|---|
NAME | STRING | page | |
|---|
parse Markdown [TEXT] as document [NAME]
Parse Markdown into a target-local named syntax tree.
Block type: COMMAND. Opcode: parseMarkdown. Permanent link
| Argument | Type | Default value | Menu choices |
|---|
TEXT | STRING | # Hello | |
|---|
NAME | STRING | page | |
|---|
document [NAME] exists?
Report whether the current target has the named document.
Block type: BOOLEAN. Opcode: hasDocument. Permanent link
| Argument | Type | Default value | Menu choices |
|---|
NAME | STRING | page | |
|---|
delete document [NAME]
Delete the named document from the current target.
Block type: COMMAND. Opcode: deleteDocument. Permanent link
| Argument | Type | Default value | Menu choices |
|---|
NAME | STRING | page | |
|---|
kind of document [NAME]
Return html or markdown.
Block type: REPORTER. Opcode: documentKind. Permanent link
| Argument | Type | Default value | Menu choices |
|---|
NAME | STRING | page | |
|---|
text in document [NAME] at [LOCATION]
Get text at the root, a numeric tree path, or a simple HTML selector.
Block type: REPORTER. Opcode: getDocumentText. Permanent link
| Argument | Type | Default value | Menu choices |
|---|
NAME | STRING | page | |
|---|
LOCATION | STRING | $ | |
|---|
replace text in document [NAME] at [LOCATION] with [TEXT]
Immutably replace text at the selected node.
Block type: COMMAND. Opcode: replaceDocumentText. Permanent link
| Argument | Type | Default value | Menu choices |
|---|
NAME | STRING | page | |
|---|
LOCATION | STRING | $ | |
|---|
TEXT | STRING | Hello | |
|---|
serialize document [NAME] as [FORMAT]
Deterministically serialize a document in its native format. Cross-format conversion is rejected as lossy.
Block type: REPORTER. Opcode: serializeDocument. Permanent link
| Argument | Type | Default value | Menu choices |
|---|
NAME | STRING | page | |
|---|
FORMAT | STRING | html | |
|---|
このブロックの固定入力編集と互換性