Skip to main content

Module page_content

Module page_content 

Source
Expand description

patch_page_content: block-tree edits on one page, with cross-page move and copy.

ModulesΒ§

address πŸ”’
What page paths name, and where blocks, lists, anchors and ranges are in the current trees.
pointer πŸ”’
Writes into a block’s attributes at a JSON Pointer.
replace_list πŸ”’
Replacing a children list with stubs, existing blocks and new blocks, and parsing new blocks.

StructsΒ§

BlockPageMove
A block now on another page; a moved block’s descendants are listed too.
Editor πŸ”’
PageContentResult
The new state after a successful call. Nothing is stored until the caller stages it.

ConstantsΒ§

MAX_BLOCK_DEPTH πŸ”’
Deeper trees stop loading: JSON nests two levels per block, and decoding stops at 128.
NOT_WRITABLE_BLOCKS πŸ”’
Raw HTML, synced patterns and the editor’s placeholder.

FunctionsΒ§

apply
Applies ops in order to page. load_page gives the page a to_page names, None when the course has no such page. Invariants are checked once, after the last op.
check_creatable πŸ”’
exercise_must_stay_top_level πŸ”’
exercise_read_only πŸ”’
referenced_pages πŸ”’
Pages named by to_page.
resolve_label_path
Resolves $label path roots in a selector path after a call, for read_back.
text_content πŸ”’