Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

/Linux/HTML Text
Function:
Required plugins for this example: MBS Linux Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /Linux/HTML Text
This example is the version from Sat, 18th Oct 2013.
Project "HTML Text.rbp"
Class App Inherits Application
Const kEditClear = "&Löschen"
Const kFileQuit = "Beenden"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
Control HTMLViewer1 Inherits HTMLViewer
ControlInstance HTMLViewer1 Inherits HTMLViewer
End Control
Control TextArea1 Inherits TextArea
ControlInstance TextArea1 Inherits TextArea
End Control
Control BevelButton1 Inherits BevelButton
ControlInstance BevelButton1 Inherits BevelButton
EventHandler Sub Action() HTMLViewer1.LoadURL "http://www.mbsplugins.de/" End EventHandler
End Control
Control BevelButton2 Inherits BevelButton
ControlInstance BevelButton2 Inherits BevelButton
EventHandler Sub Action() dim w as LinuxWebViewMBS = HTMLViewer1.LinuxWebViewMBS if w<>Nil then dim f as LinuxWebFrameMBS = w.MainFrame if f<>Nil then dim d as LinuxWebDataSourceMBS = f.DataSource if d<>Nil then dim s as string = d.Data if encodings.UTF8.IsValidData(s) then s = DefineEncoding(s, encodings.UTF8) else s = DefineEncoding(s, encodings.ISOLatin1) end if TextArea1.Text = ReplaceLineEndings(s, EndOfLine) end if end if end if Exception r as runtimeException MsgBox Introspection.GetType(r).fullname+": "+r.message End EventHandler
End Control
Control BevelButton3 Inherits BevelButton
ControlInstance BevelButton3 Inherits BevelButton
EventHandler Sub Action() dim w as LinuxWebViewMBS = HTMLViewer1.LinuxWebViewMBS if w<>Nil then dim f as LinuxWebFrameMBS = w.MainFrame if f<>Nil then dim c as LinuxJavaScriptContextMBS = f.JSContext if c<>Nil then dim s as string = c.EvaluateScript("document.body.parentNode.outerHTML") TextArea1.text = ReplaceLineEndings(s, EndOfLine) end if end if end if Exception r as runtimeException MsgBox Introspection.GetType(r).fullname+": "+r.message End EventHandler
End Control
End Class
MenuBar MenuBar1
MenuItem FileMenu = "&Ablage"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Bearbeiten"
MenuItem EditUndo = "&Rückgängig"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "&Ausschneiden"
MenuItem EditCopy = "&Kopieren"
MenuItem EditPaste = "&Einfügen"
MenuItem EditClear = "#App.kEditClear"
MenuItem UntitledMenu0 = "-"
MenuItem EditSelectAll = "&Alles auswählen"
End MenuBar
End Project

Feedback, Comments & Corrections

The items on this page are in the following plugins: MBS Linux Plugin.





Links
MBS Xojo Plugins