I have an external javascript library which triggers on the change of a textarea, formats it, etc.
However, when KnockoutJS sets the value to the textarea, the change event isn't fired. Simplified Fiddle of my problem. Is it possible to fire the change event when Knockout updates the value of my textarea?
Rather than trying to force Knockout to work with change events you can setup a subscription on the underlying observable. Like this: http://jsfiddle.net/EZC9E/1/
Instead of changing the javascript library, you might consider wrapping it into a Custom Knockout Binding. You may already need to use a custom binding for your library anyway, especially if you're using any
foreach
bindings that generate/destroy elements dynamically.Once you've got the custom binding, you have a very convenient place to trigger 'change' from.