Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with Knockout Validation #19

Open
matracey opened this issue Jul 10, 2015 · 1 comment
Open

Issue with Knockout Validation #19

matracey opened this issue Jul 10, 2015 · 1 comment

Comments

@matracey
Copy link

Seems to be an issue with the plugin and Knockout Validation (https://github.com/Knockout-Contrib/Knockout-Validation). The validation is reporting my observable as modified after TinyMCE has loaded, which in-turn is displaying my validation error prematurely.

Is there any way I can stop my observable's isModified value from being changed when TinyMCE loads?

@jurion
Copy link

jurion commented Jul 11, 2015

You can load your model after TinyMCE is loaded.
I use this :

    ko.bindingHandlers['wysiwyg'].defaults = {
        'setup': function( editor ) {
            editor.on( 'init', function( e ) {
                if (e.target.id == 'projectDescription') {
                   //load your model
                }
            });
        }
    };

Note : You probably don't need targetid check (I have multiple TinyMCE on the page, so I need to load model after the first one)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants