diff options
Diffstat (limited to 'kvision-modules/kvision-richtext/src/main')
2 files changed, 6 insertions, 7 deletions
diff --git a/kvision-modules/kvision-richtext/src/main/kotlin/pl/treksoft/kvision/KVManagerRichText.kt b/kvision-modules/kvision-richtext/src/main/kotlin/pl/treksoft/kvision/KVManagerRichText.kt index 1ccd7a85..c7cd444c 100644 --- a/kvision-modules/kvision-richtext/src/main/kotlin/pl/treksoft/kvision/KVManagerRichText.kt +++ b/kvision-modules/kvision-richtext/src/main/kotlin/pl/treksoft/kvision/KVManagerRichText.kt @@ -25,7 +25,7 @@ import pl.treksoft.kvision.i18n.I18n import pl.treksoft.kvision.utils.obj import kotlin.browser.window -internal val KVManagerRichTextInit = KVManagerRichText.init() +internal val kVManagerRichTextInit = KVManagerRichText.init() /** * Internal singleton object which initializes and configures KVision RichText module. diff --git a/kvision-modules/kvision-richtext/src/main/kotlin/pl/treksoft/kvision/form/text/RichTextInput.kt b/kvision-modules/kvision-richtext/src/main/kotlin/pl/treksoft/kvision/form/text/RichTextInput.kt index 961c27cd..43b018f4 100644 --- a/kvision-modules/kvision-richtext/src/main/kotlin/pl/treksoft/kvision/form/text/RichTextInput.kt +++ b/kvision-modules/kvision-richtext/src/main/kotlin/pl/treksoft/kvision/form/text/RichTextInput.kt @@ -23,7 +23,6 @@ package pl.treksoft.kvision.form.text import com.github.snabbdom.VNode import pl.treksoft.jquery.jQuery -import pl.treksoft.kvision.KVManagerRichText import pl.treksoft.kvision.core.Container import pl.treksoft.kvision.core.StringPair import kotlin.browser.document @@ -67,7 +66,7 @@ open class RichTextInput(value: String? = null, classes: Set<String> = setOf()) if (this.disabled || this.readonly == true) { this.getElementJQuery()?.removeAttr("contenteditable") } else { - this.getElementJQuery()?.on("trix-change", { _, _ -> + this.getElementJQuery()?.on("trix-change") { _, _ -> if (trixId != null) { val v = document.getElementById("trix-input-$trixId")?.let { jQuery(it).`val`() as String? } value = if (v != null && v.isNotEmpty()) { @@ -78,9 +77,9 @@ open class RichTextInput(value: String? = null, classes: Set<String> = setOf()) val event = org.w3c.dom.events.Event("change") this.getElement()?.dispatchEvent(event) } - }) + } } - this.getElementJQuery()?.on("trix-initialize", { _, _ -> + this.getElementJQuery()?.on("trix-initialize") { _, _ -> trixId = this.getElementJQuery()?.attr("trix-id") if (trixId != null) { value?.let { @@ -89,8 +88,8 @@ open class RichTextInput(value: String? = null, classes: Set<String> = setOf()) } } } - }) - this.getElementJQuery()?.on("trix-file-accept", { e, _ -> e.preventDefault() }) + } + this.getElementJQuery()?.on("trix-file-accept") { e, _ -> e.preventDefault() } } override fun afterDestroy() { |