Saving HTML in TextArea Weird Results

I’ve tried putting this in the initial text of a textarea, then tried putting in in like below…
Saved HTML from a textarea in another app, with no issues, but it seems like no matter what I try here I get stuff like this in the file:

ouicompat\deflang1033{\fonttbl{\f0\fnil\fcharset0 Segoe UI;}}
{\colortbl ;\red0\green0\blue0;}
{\*\generator Riched20 10.0.14393}\viewkind4\uc1
\pard\sl240\slmult1\cf1\f0\fs18 \par

\\par \\par [[TITLE]]\\par \\par html \\{\\par \\tab overflow: hidden !important;\\par \\}\\par body \\{\\par \\tab visibility:hidden;\\par \\}\\par[/code]

[code] Dim ff As FolderItem = GetTemporaryFolderItem

overlayfinal.Text = “” _

  • “” _
  • “” _
  • “[[TITLE]]” _
  • “” _
  • “” _
  • “<div id=”“lightbox-outer”">" _
  • “<div id=”“lightbox-inner”">" _
  • “<iframe src=”"[[URL]]"" width="“100%”" height="“100%”">" _
  • “” _
  • “” _
  • “” _
  • “”

overlayfinal.Text = Replace(overlayfinal.Text,"[[TITLE]]",overlayTitle.Text)
overlayfinal.Text = Replace(overlayfinal.Text,"[[URL]]",urlTrack.Text)
overlayfinal.Text = DefineEncoding( overlayfinal.Text, Encodings.UTF8 )

Dim f As FolderItem
Dim dlg As SaveAsDialog
Dim htmlType As New FileType
htmlType.Name = “HTML File (*.htm, *.html)”
htmlType.MacType = "HTML "
htmlType.Extensions = “htm”

dlg = New SaveAsDialog
f = dlg.ShowModal

If f <> Nil Then
Call overlayfinal.Save(f)
End If[/code]

Any ideas on what could be causing this?

TextArea.Save gives you the styled text unless you pass False as the optional second parameter.


Call overlayfinal.Save(f, False)

@Andrew Lambert

Gotta be kidding me lol… like 3 hours trying to figure out what the heck was up…


Thanks Andrew! Appreciate it!

This is what the docs are for :stuck_out_tongue:

Yeah I know… and believe me I looked… just apparently wasn’t paying enough attention to what I was looking at lol.