Skip to content

Conversation

@beNative
Copy link
Owner

Summary

  • add a Plate-based rich text editor wrapper with HTML serialization, toolbar controls, and scroll syncing
  • extend document classification, repository plumbing, and exports with the new rich_text doc type and sample data
  • update the prompt editor to toggle between visual/source engines, wiring Plate into preview/export flows and disabling Monaco-only actions when inactive

Testing

  • npm run test:markdown

Codex Task

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +211 to +217
const handleValueChange = useCallback(
(nextValue: SlateValue) => {
setValue(nextValue);
editor.children = nextValue;
setActiveMarks(editor.api.marks?.() ?? {});
skipNextContentSyncRef.current = true;
void pushSerializedUpdate();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Skip flag blocks loading new document content after cursor changes

handleValueChange sets skipNextContentSyncRef.current = true on every editor onChange, even when no content has changed (Slate fires onChange for selection/caret moves). The effect at the top of this component uses that flag to ignore the next content prop update, so switching to a different document after simply moving the cursor leaves the previous document’s HTML rendered. Subsequent edits will then overwrite the newly selected document with the stale content. Consider only setting the skip flag when the serialized HTML actually differs, or resetting it on selection-only changes, so external document changes always replace the editor state.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants