Menu

#126 US-YW3: Import Scene Content as Prose

v1.0.0-beta
closed
nobody
2026-01-20
2026-01-19
Anonymous
No

Originally created by: smith-and-web

User Story

As a yWriter user,
I want to have my existing scene prose imported alongside the beats,
So that I can continue drafting where I left off in yWriter.

Parent Epic: [#123]

yWriter XML Structure

<SCENE>
  <ID>1</ID>
  <Title>The Confrontation</Title>
  <SceneContent>Sarah pushed open the cafe door, scanning the room for John's familiar slouch. He was there, nursing a cold coffee, avoiding her eyes.

"You took it," she said, sliding into the booth across from him. "I know you did."

John's jaw tightened. [i]She knows[/i], he thought. [i]She always knows.[/i]</SceneContent>
</SCENE>

yWriter Markup

yWriter uses BBCode-style markup:

yWriter HTML Equivalent Kindling/TipTap
[i]...[/i] <em>...</em> Italic
[b]...[/b] <strong>...</strong> Bold
[s]...[/s] <s>...</s> Strikethrough
[u]...[/u] <u>...</u> Underline (if supported)
/* ... */ Comment Author note (preserve or strip)
> ... Blockquote marker Quoted text

Import Behavior

With Beats (GCO populated)

When scene has Goal/Conflict/Outcome:

  • Prose is associated with the scene but displayed separately
  • User writes prose while viewing beat scaffolding

Without Beats (outline only)

When scene has no GCO:

  • Prose displays as main scene content
  • No scaffolding view, just prose editing

Import Configuration Options

Prose Import Options
────────────────────
☑ Import existing prose
  ○ Import as prose content (continue drafting)
  ○ Import as reference only (start fresh)

☑ Convert yWriter markup to rich text
☑ Preserve author comments (/* ... */)

Acceptance Criteria

  • [ ] <SceneContent> field imports as prose content
  • [ ] yWriter markup converted: [i]...[/i] → italics
  • [ ] yWriter markup converted: [b]...[/b] → bold
  • [ ] Line breaks and paragraphs preserved correctly
  • [ ] Empty <SceneContent> handled gracefully (no empty prose)
  • [ ] Prose appears in the appropriate section of the scaffolded view
  • [ ] If prose exists but no beats, scene displays prose without scaffolding
  • [ ] Can toggle "import prose" option during import
  • [ ] Author comments (/* ... */) optionally preserved

Edge Cases

  • Mixed formatting: [i]italic [b]bold italic[/b] just italic[/i]
  • Unclosed tags: [i]italic text without close
  • HTML in content: Some users paste HTML; strip or convert
  • Very long scenes: 10,000+ words; ensure performance
  • Special characters: Unicode, smart quotes, em-dashes

Related

Tickets: #123

Discussion

  • Anonymous

    Anonymous - 2026-01-20

    Originally posted by: smith-and-web

    Implemented in PR [#140]. SceneContent is imported as scene prose with yWriter markup ([b], [i]) converted to HTML.

     

    Related

    Tickets: #140

  • Anonymous

    Anonymous - 2026-01-20

    Ticket changed by: smith-and-web

    • status: open --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB