Public Class Scripting
    Public Function GetVBBCode(ByVal htmlcode As String) As String
        htmlcode = htmlcode.Replace("<p>", "")
        htmlcode = htmlcode.Replace("</p>", "")
        htmlcode = htmlcode.Replace("<ul>", "[list]")
        htmlcode = htmlcode.Replace("</ul>", "[/list]")
        htmlcode = htmlcode.Replace("<li>", "[*]")
        htmlcode = htmlcode.Replace("</li>", "")
        htmlcode = htmlcode.Replace("<b>", "[b]")
        htmlcode = htmlcode.Replace("</b>", "[/b]")
        htmlcode = htmlcode.Replace("<strong>", "[b]")
        htmlcode = htmlcode.Replace("</strong>", "[/b]")
        htmlcode = htmlcode.Replace("&quot;", """")
        htmlcode = htmlcode.Replace("&nbsp;", " ")
        htmlcode = htmlcode.Replace("<h1>", vbCrLf + "[size=+2]")
        htmlcode = htmlcode.Replace("</h1>", "[/size]" + vbCrLf)
        htmlcode = htmlcode.Replace("<h2>", vbCrLf + "[size=+1]")
        htmlcode = htmlcode.Replace("</h2>", "[/size]" + vbCrLf)

        Return htmlcode
    End Function

    Public Function GetClipboard() As String
        Return Clipboard.GetText
    End Function

    Public Sub SetClipboard(ByVal value As String)
        Clipboard.SetText(value)
    End Sub
End Class