Eduardo Ruesta
02/03/2025, 7:28 PMDavid Herman
02/03/2025, 8:31 PMDavid Herman
02/03/2025, 8:31 PMEduardo Ruesta
02/03/2025, 8:41 PMDavid Herman
02/03/2025, 8:42 PM<span>Text</span>
Eduardo Ruesta
02/03/2025, 8:43 PMEduardo Ruesta
02/03/2025, 8:44 PMEduardo Ruesta
02/03/2025, 8:44 PMDavid Herman
02/03/2025, 8:46 PMDavid Herman
02/03/2025, 8:47 PMDavid Herman
02/03/2025, 8:47 PMRawHtml
in the release that went out today. You can try that too.David Herman
02/03/2025, 8:51 PMEduardo Ruesta
02/03/2025, 8:52 PMDavid Herman
02/03/2025, 8:53 PMEduardo Ruesta
02/03/2025, 9:16 PMDiv(
attrs = {
ref { element ->
element.innerHTML = uiState.content
println(element.innerHTML)
js("hljs.highlightAll()")
}
}
)
but the println is emptyDavid Herman
02/03/2025, 9:19 PMDavid Herman
02/03/2025, 9:19 PMwindow.invokeLater
in case it takes the browser a frame to propagate your changesDavid Herman
02/03/2025, 9:20 PMDavid Herman
02/03/2025, 9:21 PMEduardo Ruesta
02/03/2025, 9:21 PMDavid Herman
02/03/2025, 9:22 PMEduardo Ruesta
02/04/2025, 3:25 PMEduardo Ruesta
02/04/2025, 3:28 PMprintln(content)
Div(attrs = {
ref { element ->
element.innerHTML = content
println(content + "test")
onDispose {}
}
}
)
if i do this, this is what the console showsEduardo Ruesta
02/04/2025, 3:33 PMref
show it first when the content has nothingEduardo Ruesta
02/04/2025, 4:01 PMLaunchedEffect(hasNewsIdParam) {
if (hasNewsIdParam) {
val newsId = context.route.params[NEWS_ID_PARAM] ?: ""
val response = fetchSelectedNews(id = newsId)
if (response is NewsApiResponse.Success) {
val news = (response).data
uiState = uiState.copy(
id = news._id,
title = news.title,
subtitle = news.subtitle,
thumbnail = news.thumbnail,
content = news.content,
link = news.link ?: "",
linkTitle = news.linkTitle ?: "",
)
}
} else {
uiState = uiState.reset()
}
}
Eduardo Ruesta
02/04/2025, 4:07 PMvar fetchDone by remember { mutableStateOf(false) }
to know when the fetch is done and then to the restDavid Herman
02/04/2025, 6:14 PMEduardo Ruesta
02/04/2025, 6:20 PM