MohamedRejeb / compose-rich-editor

A Rich text editor library for both Jetpack Compose and Compose Multiplatform, fully customizable, supports HTML and Markdown.
https://mohamedrejeb.github.io/compose-rich-editor/
Apache License 2.0
1.17k stars 76 forks source link

Unable to customize list indents #375

Closed akishind-medlinx closed 1 month ago

akishind-medlinx commented 1 month ago

I'm using fresh 1.0.0-rc08 version but I'm not able to set list indents - the values I pass seem to be ignored. I create my state like this:

@Composable
fun rememberMarkdownEditorState(initialText: String): RichTextState {
    val textState = rememberRichTextState()
    LaunchedEffect(Unit) {
        textState.config.run {
            orderedListIndent = 10
            unorderedListIndent = 100
        }
        textState.setMarkdown(initialText)
    }
    return textState
}

But the result is always the same regardless of what values I set.

Maybe I'm not doing it properly and we need to manipulate config some other way? And what kind of value is expected - raw pixels? (BTW it would be nice if we could just pass the config in state's constructor)

akishind-medlinx commented 1 month ago

My bad, there was a mixup in my code