If you put this javascript code in a global function:

1
2
3
4
5
<script type="text/javascript">
var initTinymce = function() {
    tinymce.init(/* ... */)
};
</script>

Then you can do the following in F#:

1
2
3
4
5
6
open WebSharper
open WebSharper.JavaScript

[<JavaScript>]
let InitTinymce() =
    JS.Window?initTinymce()

JS.Window is the global window object, and the dynamic operator ? accesses a JavaScript object field on an arbitrary value.

By on 6/2/2015 2:58 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper