public/ckeditor/_source/plugins/bidi/plugin.js
function getElementForDirection( node )
	{
		while ( node && !( node.getName() in allGuardElements || node.is( 'body' ) ) )
		{
			var parent = node.getParent();
			if ( !parent )
				break;

			node = parent;
		}

		return node;
	}
function getElementForDirection( node )
	{
		while ( node && !( node.getName() in allGuardElements || node.is( 'body' ) ) )
		{
			var parent = node.getParent();
			if ( !parent )
				break;

			node = parent;
		}

		return node;
	}
function getElementForDirection ( node ) { while ( node && ! ( node . getName ( ) in allGuardElements || node . is ( 'body' ) ) ) { var parent = node . getParent ( ) ; if ( ! parent ) break ; node = parent ; } return node ; }
Returns element with possibility of applying the direction.
@param node
Returns element with possibility of applying the direction .