{"id":48875858,"url":"https://github.com/beeper/matrix-messageformat-compose","last_synced_at":"2026-04-16T00:33:23.033Z","repository":{"id":333008873,"uuid":"1135821383","full_name":"beeper/matrix-messageformat-compose","owner":"beeper","description":"Kotlin multiplatform library for rendering formatted Matrix message contents in Jetpack Compose","archived":false,"fork":false,"pushed_at":"2026-04-11T17:53:37.000Z","size":167,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-11T19:26:43.472Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/beeper.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-16T16:33:06.000Z","updated_at":"2026-04-11T17:53:45.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/beeper/matrix-messageformat-compose","commit_stats":null,"previous_names":["beeper/matrix-messageformat-compose"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/beeper/matrix-messageformat-compose","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beeper%2Fmatrix-messageformat-compose","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beeper%2Fmatrix-messageformat-compose/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beeper%2Fmatrix-messageformat-compose/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beeper%2Fmatrix-messageformat-compose/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beeper","download_url":"https://codeload.github.com/beeper/matrix-messageformat-compose/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beeper%2Fmatrix-messageformat-compose/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31866347,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"ssl_error","status_checked_at":"2026-04-15T15:24:39.138Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-16T00:33:22.232Z","updated_at":"2026-04-16T00:33:23.006Z","avatar_url":"https://github.com/beeper.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![](https://www.jitpack.io/v/beeper/matrix-messageformat-compose.svg)](https://www.jitpack.io/#beeper/matrix-messageformat-compose)\n\n# matrix-messageformat-compose\n\nKotlin multiplatform library to translate Matrix [formatted body](https://spec.matrix.org/unstable/client-server-api/#mroommessage-msgtypes) from HTML to `AnnotatedString` for native rendering in Jetpack Compose.\n\n## Usage\n\nMinimal working example:\n\n```\nval parseResult = remember(textInput) {\n    MatrixHtmlParser().parse(\n        input = textInput,\n        style = MatrixBodyPreFormatStyle(),\n        allowRoomMention = true,\n    )\n}\nMatrixStyledFormattedText(\n    parseResult = parseResult,\n    inlineContent = parseResult.inlineImages.toInlineContent(\n        LocalDensity.current,\n        defaultHeight = 20.sp\n    ) { info, modifier -\u003e\n        // Your inline image rendering logic here\n        AsyncImage(\n            model = info.uri,\n            contentDescription = info.alt ?: info.title,\n            modifier = modifier,\n        )\n    },\n)\n```\n\nIt is recommended to move `MatrixHtmlParser().parse()` from above example out of the UI thread\ninto some preprocessing logic, since that's the most expensive part and does not apply any\ndensity or theme-specific styling yet.\n\nYou can customize rendering by following means:\n- `MatrixBodyPreFormatStyle`: Provides some overrides for the pre-processing step, that are not related to screen density or theme yet.\n- `MatrixBodyDrawStyle`: Holds callbacks to be executed in a `DrawScope` for drawing behind certain spans, e.g. for background rendering for code blocks and similar.\n- `MatrixBodyStyledFormatter`: abstract class that applies styling to the preprocessed `AnnotatedString`, that has been deferred from the initial step in order to allow styling from a compose context without the overhead of the full parser running.\n  You can implement this class manually, or start off of `DefaultMatrixBodyStyledFormatter` to only extend what you want to change from the provided defaults.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeeper%2Fmatrix-messageformat-compose","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeeper%2Fmatrix-messageformat-compose","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeeper%2Fmatrix-messageformat-compose/lists"}