mikepenz / multiplatform-markdown-renderer

Markdown renderer for Kotlin Multiplatform Projects (Android, iOS, Desktop), using Compose.
https://mikepenz.github.io/multiplatform-markdown-renderer/
Apache License 2.0
416 stars 27 forks source link

Apply modifier to a link component #191

Closed apolostudio closed 1 month ago

apolostudio commented 3 months ago

About this issue

I want to add a pointerHoverIcon modifier to links (it should be the default behaviour imo) but i can't find a way to pass a modifier to a link component edit (Images cannot be centered, im using custom transformer with Kamel with alignment center but its always staying in the start)

Details

Checklist

mikepenz commented 2 months ago

Links and images are a complex topic.

Related to images. There are 2 different forms of images. There are either the inline images and on the other side the normal image components.

You can see how inline images are handled here:

Depending on which style of image you have, positioning or aligning might be quite a different task.


Links may be either a auto link or a markdown link, which are handled here: https://github.com/mikepenz/multiplatform-markdown-renderer/blob/develop/multiplatform-markdown-renderer/src/commonMain/kotlin/com/mikepenz/markdown/utils/AnnotatedStringKtx.kt#L136-L139

By default these use the following style: https://github.com/mikepenz/multiplatform-markdown-renderer/blob/develop/multiplatform-markdown-renderer/src/commonMain/kotlin/com/mikepenz/markdown/utils/AnnotatedStringKtx.kt#L55-L59

You can overwrite the default handling by providing your own custom markdown annotator and handle them manually:

mikepenz commented 1 month ago

Closing due to inactivity. Please report back