CoreFiles by mySites.guru
none.js33 lines, 823 bytes, from Joomla_3.6.4-Stable-Full_Package.zip
Raw History Compare with 3.6.3
md5
578c1c12cd90e634761fed3c45256a8b
sha1
3c2bd233a5a7df1321be49a568f564499701fc57
sha256
54797bceb728c982949fb46ca1ab27a3672aa78e9c6b92de24b7fcb7526995a9
/**
 * @copyright   Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

/**
 * Editor None
 */
function insertAtCursor(myField, myValue)
{
	if (document.selection)
	{
		// IE support
		myField.focus();
		sel = document.selection.createRange();
		sel.text = myValue;
	} else if (myField.selectionStart || myField.selectionStart == '0')
	{
		// MOZILLA/NETSCAPE support
		var startPos = myField.selectionStart;
		var endPos = myField.selectionEnd;
		myField.value = myField.value.substring(0, startPos)
			+ myValue
			+ myField.value.substring(endPos, myField.value.length);
	} else {
		myField.value += myValue;
	}
}

function jInsertEditorText(text, editor)
{
	insertAtCursor(document.getElementById(editor), text);
}

The same content is in 17 releases, Joomla 3.6.0-alpha to 3.7.0-alpha1. See them all, or every version of this file.