FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
Coming Back to Kotlin: Building a Real App with KMP Part 3 — From Raw HTML to Native Content
How-ToWeb Development

Coming Back to Kotlin: Building a Real App with KMP Part 3 — From Raw HTML to Native Content

via Dev.toRaul Arroyo3h ago

Part 3 — Parsing WordPress HTML and Enriching Embeds WordPress posts arrive as raw HTML strings. A single post might contain paragraphs, headings, YouTube iframes, Spotify embeds, Instagram blockquotes, image galleries, internal post references, and ordered lists — all mixed together, none of it consistent. You can't just dump that into a WebView and call it a day. Well, you could. But the result looks like a website inside an app, it doesn't respect your theme, dark mode breaks, fonts are wrong, and interactions feel foreign. For a magazine app where the reading experience is the whole point, that's not acceptable. The approach: a custom HTML parser that converts raw WordPress HTML into a typed List<ContentPart> that Compose can render natively. ContentPart — The Typed Model The first thing to build is the sealed interface that represents every possible block of content: sealed interface ContentPart { data class Text ( val content : AnnotatedString ) : ContentPart data class Heading (

Continue reading on Dev.to

Opens in a new tab

Read Full Article
2 views

Related Articles

Lululemon bets Epoch Biodesign can eat its shorts, literally
How-To

Lululemon bets Epoch Biodesign can eat its shorts, literally

TechCrunch • 4h ago

Crusoe makes big battery buys for its data centers
How-To

Crusoe makes big battery buys for its data centers

TechCrunch • 8h ago

What Your Engineering Manager Actually Does All Day
How-To

What Your Engineering Manager Actually Does All Day

Medium Programming • 9h ago

The Lego Game Boy makes for a great gift, and it’s $10 off today
How-To

The Lego Game Boy makes for a great gift, and it’s $10 off today

The Verge • 10h ago

How To Apply Global Filters With EF Core Query Filters
How-To

How To Apply Global Filters With EF Core Query Filters

Medium Programming • 10h ago

Discover More Articles