sisyphus
sisyphus copied to clipboard
sisyphus doesn't work with a summernote textarea
I'm using sisyphus for the first time and it works perfectly on my forms. Unfortunately, some forms have a summernote textarea and this field is a DIV and a P and not a classic form field (like input for example). How can I save my data with sisyphus in this case?
Thank you very much for your answer. Laetitia.
I think this WYSIWYG editor is not supported yet. You can take a look how CKEditor is supported with the plugin and try implement it similar way. The plugin is to save form's data and div
is not a form element. However, I believe that "summernote" falls back to form elements the way CKEditor does so implementing support for it should be doable.
Pretty simple :
$(document).on('keyup', '.note-editable', function() { var textarea = $(this).parent().prev('textarea'); textarea.val($(this).html()); textarea.trigger('change'); });