Hi all,
I have created a working sample of TinyMCE in DreamWeaver, simply to prove myself that I understand what I need and because it is easier to debug.
I created a WebControlWrapper, read the WebControlSDK, followed the samples and I believe I have everything setup as it should.
To keep thing simple I tried to create a very basic control.
Can someone help me to find out why I only see the text area and not the editor?
FYI the _init function is called and executed (checked with an alert) and the tinymce.init method is really a function (code flows) so imho the libraries are loaded…
This is how I initialise:
XojoCustom.it2be.editor.<<var>>_init = function() {
if (typeof tinymce.init == "function") {
tinymce.init({
selector : "textarea#<<var>>_it2be",
width : <<width>>,
height : <<height>>,
resize : false,
onchange_callback : "Xojo.triggerServerEvent('<<var>>', 'ContentChanged')"
});
}
};
This is my open method (tried it with and without the timeout):
LoadLibraries("setTimeout(XojoCustom.it2be.editor." + Self.ControlID + "_init(), 10);","https://my.domain.name/tinymce/tinymce.min.js")
This is my SetupHTML method:
[code] Dim source() As String
source.Append("<div id=""" + self.ControlID + “”">")
source.append("<textarea id=""" + self.ControlID + “_it2be”">" + Content + “”)
source.append("")
Return Join(source, “”)[/code]
This is my SetupJavascriptFramework method:
[code] Dim source() As String
Dim src As String = kInitializer
src = src.ReplaceAll("<>", Self.ControlID)
src = src.ReplaceAll("<>", CStr(Self.Width - 2))
src = src.ReplaceAll("<>", CStr(Self.Height - 78))
source.Append(src)
Return Join(source, EndOfLine)[/code]
All help is appreciated.
Thanks,
Marcel