• Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
jslez

jslez

slidebot

Public
Like
slidebot
Home
Code
9
backend
4
backup
1
debug
1
frontend
1
pptx_examples
2
README-content-editing.md
README-development.md
README-how_pptx-works.md
README.md
Branches
1
Pull requests
Remixes
History
Environment variables
7
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
README-content-editing.md
Code
/
README-content-editing.md
Search
…
README-content-editing.md

Content Editing System

How It Works

When a user says "change the executive summary," the system:

  1. AI identifies the target: Determines if user wants entire text box or single element
  2. AI generates markdown: Creates clean bullet points like • First point\n• Second point
  3. System parses markdown: Identifies bullets, sub-bullets, plain text
  4. System generates XML: Converts to proper PowerPoint structure with bullet formatting
  5. System replaces content: Swaps entire text box content while preserving structure

AI Decision Logic

User: "Change the executive summary"
→ AI: Text box replacement (entire content section)
→ Response: textBoxId: "TB1", slideNumber: 2

User: "Change the executive summary title" 
→ AI: Single element replacement
→ Response: elementId: "2A"

User: "Use this template to make a deck about tortoises"
→ AI: Template detected (placeholder content like "Front cover template")
→ Response: action: "multi-slide" (replace all template content)

Template Recognition

The AI automatically detects template files by looking for placeholder content:

  • "Front cover template"
  • "Test description"
  • "Executive Summary" with generic content
  • Other template-like placeholder text

When templates are detected, the AI defaults to multi-slide operations that replace all placeholder content with coordinated, themed content. This matches user intent - templates are meant to be completely transformed, not just have content added.

Markdown Format

AI generates content in simple markdown:

• Main bullet point
• Another main point
  • Sub-bullet (indented)
• Final main point

XML Generation

System converts markdown to PowerPoint XML by generating only the inner content:

<!-- Generated inner content (no <p:txBody> wrapper) --> <a:bodyPr spcFirstLastPara="1" wrap="square" lIns="0" tIns="0" rIns="0" bIns="0" anchor="t" anchorCtr="0"> <a:noAutofit/> </a:bodyPr> <a:lstStyle/> <a:p> <a:pPr marL="182880" lvl="0" indent="-173990" algn="l" rtl="0"> <a:buChar char="•"/> </a:pPr> <a:t>Main bullet point</a:t> </a:p>

The system then replaces the content between existing <p:txBody> tags to avoid XML structure corruption.

Text Box vs Element Targeting

Text Box Replacement (entire content):

  • User says: "change executive summary", "replace all bullets"
  • AI returns: textBoxId + slideNumber
  • System replaces: Entire <p:txBody> content

Element Replacement (single item):

  • User says: "change title", "replace first bullet"
  • AI returns: elementId
  • System replaces: Single <a:t> tag

Current Limitations

  • Only handles body text boxes (bullets) for full replacement
  • Sub-bullet indentation is simplified
  • No support for complex formatting (bold, italic, etc.)
  • Text box identification relies on placeholder type matching

Troubleshooting

Content duplication: Check if AI returned elementIds array instead of textBoxId Missing bullets: Verify markdown parsing found bullet markers (•, -, *) Wrong text box: Check if text box regex pattern matches the slide structure XML corruption: Ensure generated content doesn't include <p:txBody> wrapper tags PowerPoint repair needed: Usually indicates nested XML tags or missing required attributes

FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.