Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Implementation:0xranx OpenContext IOS DocEditor Screen

From Leeroopedia
Knowledge Sources
Domains UI, Document_Editor, iOS
Last Updated 2026-10-24 00:00 GMT

Overview

React Native screen component for creating and editing markdown documents on iOS, with a WebView-based editor and save/delete actions.

Description

The DocEditorScreen component in src-ios/screens/ provides a document editor interface. It accepts mode ("create" or "edit") and doc (existing doc object) via navigation params. In edit mode it loads the doc content asynchronously, renders a title input and an EditorWebView for markdown editing. Save calls createDoc or updateDoc, while delete shows an alert confirmation before calling deleteDoc.

Usage

Use as a screen in a React Navigation stack navigator for document editing flows.

Code Reference

Source Location

Signature

function DocEditorScreen({ navigation, route })
// route.params: { mode: 'create' | 'edit', doc?: DocRow }

Import

const DocEditorScreen = require('./screens/DocEditorScreen');

I/O Contract

Inputs

Name Type Required Description
navigation object Yes React Navigation object
route object Yes Contains params: { mode, doc }

Outputs

Name Type Description
JSX React.Element Editor screen with title input and WebView

Usage Examples

Navigation to Editor

// Navigate to create mode
navigation.navigate('DocEditor', { mode: 'create' });

// Navigate to edit mode
navigation.navigate('DocEditor', { mode: 'edit', doc: selectedDoc });

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment