michaelpapworth / tinymce-knockout-binding

A KnockoutJS custom binding that applies a TinyMCE Editor to the bound HTML element
MIT License
39 stars 19 forks source link

Not working on IE8 #1

Closed soufianeh closed 10 years ago

soufianeh commented 10 years ago

Any idea why wouldn't this work on IE8? The console doesn't display any errors, and instead of getting the tinymce editor, my textarea looks like this after the binding:

<textarea id=mce_0 class="note" rows="10" cols="30" data-bind="wysiwyg: noteText" __ko__1387347980985="ko165"></textarea>

michaelpapworth commented 10 years ago

Can you confirm versions of jQuery = 1.7.2 or later, Knockout = 3.0.0 or later, TinyMCE = 4.0.0 or later and accompanying jQuery plugin? I have updated the README for clarity.

soufianeh commented 10 years ago

Yes, I can confirm that, something I forgot to mention, I'm using durandaljs for my SPA, would that be a problem?

michaelpapworth commented 10 years ago

It's entirely possible that DurandalJS could be the problem; however, since I am unfamiliar with it I can't comment at this time. It would appear from the HTML you have posted that the binding was called and an editor instantiated.

I put together the following very basic page and can confirm there is no issue in IE8.


<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <title>IE8 Test</title>
</head>
<body>
    <textarea rows="10" cols="30" data-bind="wysiwyg: noteText"></textarea>

    <script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.2.min.js"> </script>
    <script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/knockout/knockout-3.0.0.js"> </script>
    <script type="text/javascript" src="http://tinymce.cachefly.net/4.0/tinymce.min.js"> </script>
    <script type="text/javascript" src="http://tinymce.cachefly.net/4.0/jquery.tinymce.min.js"> </script>
    <script type="text/javascript" src="wysiwyg.debug.js"> </script>
    <script type="text/javascript">
        (function ($) {
            function Model() {
                var self = this;
                self.noteText = ko.observable();
            }

            $(document).ready(function () {
                ko.applyBindings(new Model());
            });
        }(jQuery));
    </script>
</body>
</html>

Are you able to step through the debug and confirm whether any exceptions are thrown and caught, causing it to fail silent? Looks as though this could be the case http://stackoverflow.com/questions/20622833/durandal-applybindings-how-to