last days I spend to implement the TinyMCE Editor into a custom Control of Xojo WebApps.
I used the WebSDK first time, so there were a lot of problems to solve.
But! The result is usable!
You can Download the TestProject with the Control from here.
The using is quite simple:
1.) Upload the tinyMCE-folder to your Webserver
2.) In the Control there is a property named ‘ScriptLocation’
-> Replace the default with the location of the tinymce-folder you’ve uploaded
3.) to set the html-content use
DOIT_TinyMCE1.html = "<b>your html</b>
4.) to get the current html you have to do 2 steps:
4.1) call the method
DOIT_TinyMCE1.ValidateHTML - this takes the html-content from the control into the html-property
4.2) If the html-content is send back to the server, the event ‘HTMLready’ fires and you can use the html-property. Cause all in the web is asyncronious, I had to go this way. Best you do subscribe to this event in the control of your webpage.
Check the testproject!
For advanced Users:
In the tinyMCE-Folder, there is a file named “tinymce1.js”. This is the configuration of the control. If you want to config your tinymce-editor by yourself, you have to read the instructions on the website of tinymce.
I hope you enjoy the using or do improve this project. That would be nice!