#VirtualMachineArgs: --add-opens javafx.web/javafx.scene.web=ALL-UNNAMED --add-opens javafx.web/com.sun.webkit=ALL-UNNAMED --add-opens javafx.web/com.sun.webkit.graphics=ALL-UNNAMED --add-opens javafx.web/com.sun.javafx.webkit=ALL-UNNAMED --add-opens javafx.web/com.sun.javafx.webkit.theme=ALL-UNNAMED --add-opens javafx.web/com.sun.webkit.event=ALL-UNNAMED --add-opens javafx.web/com.sun.javafx.webkit.prism=ALL-UNNAMED --add-opens javafx.web/com.sun.webkit.perf=ALL-UNNAMED --add-opens javafx.web/com.sun.webkit.network=ALL-UNNAMED --add-opens javafx.web/com.sun.webkit.plugin=ALL-UNNAMED --add-opens java.xml/org.w3c.dom=ALL-UNNAMED --add-opens javafx.web/com.sun.webkit.dom=ALL-UNNAMED --add-opens java.xml/org.w3c.dom.events=ALL-UNNAMED --add-opens java.xml/org.w3c.dom.ranges=ALL-UNNAMED --add-opens java.xml/org.w3c.dom.traversal=ALL-UNNAMED --add-opens java.xml/org.w3c.dom.views=ALL-UNNAMED --add-opens javafx.web/com.sun.webkit.network.about=ALL-UNNAMED --add-opens javafx.web/com.sun.webkit.network.data=ALL-UNNAMED
Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Private xui As XUI
Private Button1 As B4XView
Private HTMLEditor1 As HTMLEditor
Private WebPage As JavaObject
Private HtmlEditorCommand As JavaObject
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.RootPane.LoadLayout("Layout1")
MainForm.Show
Dim jo As JavaObject = HTMLEditor1
Dim r As Reflector
r.Target = jo.RunMethod("getSkin", Null)
WebPage = r.GetField("webPage")
HtmlEditorCommand.InitializeStatic("javafx.scene.web.HTMLEditorSkin.Command")
End Sub
Sub Button1_Click
ExecuteCommand("BOLD", Null)
ExecuteCommand("FOREGROUND_COLOR", CSSUtils.ColorToHex(fx.Colors.From32Bit(xui.Color_Blue)))
End Sub
Sub ExecuteCommand (Command As String, Value As Object)
WebPage.RunMethod("executeCommand", Array(HtmlEditorCommand.GetFieldJO(Command).RunMethod("getCommand", Null), Value))
End Sub