You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I have script which translates latin keyboard to other language.
Here is a function which is responsible for pasting this script
function pasteTo(field) {
if (document.selection) {
field.focus();
var sel = document.selection.createRange();
if(sel) {
sel.text = this;
field.focus();
}
} else if (field.selectionStart || field.selectionStart == '0') {
var startPos = field.selectionStart;
var endPos = field.selectionEnd;
var scrollTop = field.scrollTop;
field.value = field.value.substring(0, startPos)+ this+ field.value.substring(endPos,field.value.length);
field.focus();
field.selectionStart = startPos + this.length;
field.selectionEnd = startPos + this.length;
field.scrollTop = scrollTop;
} else if($(field).hasClass('froala-element')) {
console.log(field)
console.log(this);
// need help here
} else {
field.value += this;
field.focus();
}
};
So I can deal with usual textarea and input elements, but problem rises with Froala.
I went through froala methods but coud not really decide how to correctly deal with this so maybe you can help me here. field is element where I'm typing and this is a key (one letter) to paste
The text was updated successfully, but these errors were encountered:
We keep this repo for specific purposes as it is written in the read me. It is not for tech support:
4) For feature requests, tech support and general discussion, don't use GitHub Issues. See http://editor.froala.com/contact for the appropriate channels.
So I have script which translates latin keyboard to other language.
Here is a function which is responsible for pasting this script
So I can deal with usual textarea and input elements, but problem rises with Froala.
I went through froala methods but coud not really decide how to correctly deal with this so maybe you can help me here.
field
is element where I'm typing andthis
is a key (one letter) to pasteThe text was updated successfully, but these errors were encountered: