bootstrap-wysiwyg icon indicating copy to clipboard operation
bootstrap-wysiwyg copied to clipboard

Events and cleanHTML aren't available

Open floriansegginger opened this issue 7 years ago • 2 comments

Using the very example given in this repo

  $('#question-editor').wysiwyg().on('change', function () {
    // Do something
  });

Just spits out a jQuery error:

jquery.min.js:2 Uncaught TypeError: Cannot read property 'on' of undefined
    at HTMLDocument.<anonymous> (poll.js:26)
    at j (jquery.min.js:2)
    at k (jquery.min.js:2)

It seems the wysiwyg() function doesn't actually return anything anymore.

I would suggest updating the examples

floriansegginger avatar May 01 '17 14:05 floriansegginger

Unless I'm mistaken, this seems like a more serious problem where this plug-in is basically unusable in its current form.

The Wysiwyg class is never exposed because it is in a self-calling function, and the jquery function doesn't return the newly created object. How can we do anything with this?

floriansegginger avatar May 01 '17 14:05 floriansegginger

@floriansegginger thanks, I've pushed this (minus the bower changes) to my fork!

spreadred avatar Jun 06 '17 18:06 spreadred