NicolasCARPi / jquery_jeditable

jQuery edit in place plugin. Extendable via plugin architecture. Plugins for plugin. Really.
https://jeditable.elabftw.net
MIT License
1.74k stars 458 forks source link

Get text instead of html for callback result #214

Closed JavierPDev closed 4 years ago

JavierPDev commented 4 years ago

Currently, the callback option function returns innerHTML as a result. This means the value that gets returned will have HTML entities like &. You can see this in action in this jsfiddle: https://jsfiddle.net/mhrvzdas/3/

It seems like it would be more useful to return the text content that the user edited into place rather than its HTML representation. This commit makes this happen.

NicolasCARPi commented 4 years ago

Hello,

Thank you for your contribution. I agree that returning the text is better.

Note: this would be a breaking change for users using callbacks.