Choose the page’s editor
Switch between Kindly’s on-page editor and the WordPress editor while preserving saved content.
Switching editors#
Built content has an Edit on page button on its WordPress edit screen. Use WordPress editor returns the current saved body to WordPress. It keeps revisions and converts registered live slots and Shortcode elements to their shortcodes. Coming back with Build it on the page instead turns those shortcodes back into the same Shortcode elements, but only the ones the page already had. Publish or discard a saved Kindly draft before switching; a stale tab cannot overwrite the new editor choice.
Choose Build it on the page instead to return. An unchanged round trip restores the original flat HTML. Content edited in WordPress keeps its current words, without wrapping existing sections in a second page shell.
Template-backed records#
Themes can opt their content types into the build button with cantata_edit_build_post_types. Use cantata_edit_build_template to choose the body conversion shell for the specific WP_Post; keep template-owned headings, dates and registration outside the editable root. Built bodies must render cantata_edit_page_source() through cantata_edit_render() so drafts, revisions and live slots work correctly. Native bodies continue through WordPress's normal renderer.
The section-list REST request includes its post ID and checks permission to edit that record. Configuration and component caches are scoped by post ID. cantata_edit_component_files lets a theme supply a different set of component files for that record context. cantata_edit_blocks can narrow generic blocks; allowLiveInsert: false in the theme config hides new live-source insertion without disconnecting existing live content.
Optional previewMainClass and previewContentClass config values give miniature section previews the same CSS ancestors as their real content area. Classes are assigned through DOM attributes, not interpolated into markup.
Live sources may provide manage: {url, label, hint}. Runtime output may provide data-ce-manage-url, data-ce-manage-label, and data-ce-manage-hint; output URLs are accepted only on the same origin. Guidance is shown as text and runtime markers are removed before saving. A fixed source presents its management link as the primary action.