Slackbot
08/11/2023, 10:07 PMYousef
08/11/2023, 10:08 PM@JsModule("easymde")
@JsNonModule
external class EasyMDE(options: dynamic)
and
@Composable
@Page
fun CreatePost() {
val options = js("{}")
options.element = "document.getElementById('post-body')"
EasyMDE(options)
val postBody = remember { mutableStateOf("") }
PageLayout(Strings.CreatePost(i18n4k.locale)) {
AdminLayout {
TextArea(attrs = Modifier.attrsModifier {
id("post-body")
attr("placeholder", "placeholder")
}.toAttrs(), value = postBody.value)
}
}
}
turansky
08/11/2023, 10:30 PMoptions.element = "document.getElementById('post-body')"
Invalid element id?Yousef
08/12/2023, 5:15 AMYousef
08/12/2023, 10:28 AMYousef
08/12/2023, 12:16 PMUncaught TypeError: textarea.style is undefined