 import flashx.textLayout.elements.IConfiguration;
 import flashx.textLayout.elements.ParagraphElement;
 import flashx.textLayout.elements.TextFlow;
+import flashx.textLayout.elements.TextRange;
 import flashx.textLayout.events.SelectionEvent;
 import flashx.textLayout.formats.Category;
 import flashx.textLayout.formats.ITextLayoutFormat;

        
        if (textFlow.interactionManager)
        {
            // If there is a selection manager use it so that the format
            // will include any attributes set on a point selection but not 
            // yet applied.	
            return textFlow.interactionManager.getCommonCharacterFormat();
        }
        else
        {

        // Make sure there is a text flow with a flow composer.  There will
        // not be an interaction manager if editingMode is read-only.  If
        // there is an interaction manager flush any pending inserts into the
        // text flow unless we are delaying updates in which case we may have to finish
        // composition.
        if (composeState != TextContainerManager.COMPOSE_COMPOSER)
        {
            convertToTextFlowWithComposer();
        }
        else if (textFlow.interactionManager)
        {
            const editManager:IEditManager = textFlow.interactionManager as IEditManager;
            if (editManager && editManager.delayUpdates)
                editManager.updateAllControllers();
            else
                textFlow.interactionManager.flushPendingOperations();
        }
        
        return textFlow;
    }
