mirror of
https://github.com/humhub/humhub.git
synced 2025-01-17 14:18:27 +01:00
Removed formatting from HEditorWidget on copy & paste
This commit is contained in:
parent
ed266f1867
commit
a527976f6e
@ -86,6 +86,24 @@
|
||||
}
|
||||
})
|
||||
|
||||
$('#<?php echo $id; ?>_contenteditable').on('paste',function(event) {
|
||||
|
||||
// disable standard behavior
|
||||
event.preventDefault();
|
||||
|
||||
// get clipbord content
|
||||
var text = (event.originalEvent || event).clipboardData.getData('text/html');
|
||||
|
||||
// create jQuey object and paste content
|
||||
var $result = $('<div></div>').append($(text))
|
||||
|
||||
// set plain text at current cursor position
|
||||
insertTextAtCursor($result.text());
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
$('#<?php echo $id; ?>_contenteditable').keypress(function (e) {
|
||||
if (e.which == 13) {
|
||||
// insert a space by hitting enter for a clean convert of user guids
|
||||
|
Loading…
x
Reference in New Issue
Block a user