Authentic.CurrentSelection
Declaración CurrentSelection as AuthenticSelection
Descripción
La propiedad ofrece acceso a la selección actual en la vista Authentic.
El código del ejemplo siguiente recupera el texto completo de la selección actual:
JavaScript:
// en alguna parte del script:
GetSelection(objPlugIn.CurrentSelection);
// GetSelection() recopila la selección total del texto
function GetSelection(objSel)
{
var strText = "";
var objCurrent = objSel.Start;
while(!objSel.End.IsSameNode(objCurrent))
{
objCurrent = objPlugIn.GetNextVisible(objCurrent);
strText += objCurrent.TextValue;
}
strText += objSel.End.TextValue.substring(0,objSel.EndTextPosition);
return objSel.Start.TextValue.substr(objSel.StartTextPosition) + strText;
}