Implementation:0xranx OpenContext IOS DocEditor Screen
| 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
- Repository: 0xranx_OpenContext
- File: src-ios/screens/DocEditorScreen.js
- Lines: 1-123
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
// Navigate to create mode
navigation.navigate('DocEditor', { mode: 'create' });
// Navigate to edit mode
navigation.navigate('DocEditor', { mode: 'edit', doc: selectedDoc });