sisyphus icon indicating copy to clipboard operation
sisyphus copied to clipboard

sisyphus doesn't work with a summernote textarea

Open LaetitiaGirard opened this issue 10 years ago • 2 comments

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.

LaetitiaGirard avatar Nov 26 '14 16:11 LaetitiaGirard

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.

simsalabim avatar Nov 26 '14 22:11 simsalabim

Pretty simple :

$(document).on('keyup', '.note-editable', function() { var textarea = $(this).parent().prev('textarea'); textarea.val($(this).html()); textarea.trigger('change'); });

lukepolo avatar May 06 '15 15:05 lukepolo