1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-04-29 23:49:21 +03:00

Доработка markitup для выделения внешнего текста

This commit is contained in:
Mzhelskiy Maxim 2011-08-30 06:21:23 +00:00
parent 679c58b678
commit d2c5fbb5c5

View file

@ -164,7 +164,7 @@
}).click(function() {
return false;
}).bind("focusin", function(){
$$.focus();
//$$.focus();
}).mouseup(function() {
if (button.call) {
eval(button.call)();
@ -286,6 +286,7 @@
root:options.root,
textarea:textarea,
selection:(selection||''),
selectionOuter:(selectionOuter||''),
caretPosition:caretPosition,
ctrlKey:ctrlKey,
shiftKey:shiftKey,
@ -413,6 +414,12 @@
// get the selection
function get() {
// get the selection by outer text
if ($.browser.msie) {
selectionOuter=document.selection.createRange().text;
} else {
selectionOuter=document.getSelection();
}
textarea.focus();
scrollPosition = textarea.scrollTop;