phpBB

Code Changes

File: styles/prosilver/template/editor.js

  Unmodified   Added   Modified   Removed
Line 152Line 152
		text = ' ' + text + ' ';
}


		text = ' ' + text + ' ';
}


	if (!isNaN(textarea.selectionStart))



	// Since IE9, IE also has textarea.selectionStart, but it still needs to be treated the old way.
// Therefore we simply add a !is_ie here until IE fixes the text-selection completely.
if (!isNaN(textarea.selectionStart) && !is_ie)

	{
var sel_start = textarea.selectionStart;
var sel_end = textarea.selectionEnd;

	{
var sel_start = textarea.selectionStart;
var sel_end = textarea.selectionEnd;

Line 216Line 218
	}

// Get text selection - not only the post content :(

	}

// Get text selection - not only the post content :(

	if (window.getSelection)


	// IE9 must use the document.selection method but has the *.getSelection so we just force no IE
if (window.getSelection && !is_ie && !window.opera)

	{
theSelection = window.getSelection().toString();
}

	{
theSelection = window.getSelection().toString();
}

	else if (document.getSelection)

	else if (document.getSelection && !is_ie)

	{
theSelection = document.getSelection();
}

	{
theSelection = document.getSelection();
}

Line 344Line 347
*/
function storeCaret(textEl)
{

*/
function storeCaret(textEl)
{

	if (textEl.createTextRange)

	if (textEl.createTextRange && document.selection)

	{
textEl.caretPos = document.selection.createRange().duplicate();
}

	{
textEl.caretPos = document.selection.createRange().duplicate();
}

Line 454Line 457

return caretPos;
}


return caretPos;
}