小小菜鸟的web菜园子

web开发学习。好记性不如烂笔头。每天进步一点点!

导航

精简RichTextEditor组件HTML内容的空白空间.

richTextEditor.textArea.condenseWhite属性
示例:

代码:

<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2008/04/24/condensing-html-white-space-in-the-richtexteditor-control-in-flex/ -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout
="vertical"
        verticalAlign
="middle"
        backgroundColor
="white">

    
<mx:Script>
        
<![CDATA[
            private function checkBox_change(evt:Event):void {
                richTextEditor.textArea.condenseWhite = checkBox.selected;
            }
        
]]>
    
</mx:Script>

    
<mx:String id="str" source="lorem.html" />

    
<mx:ApplicationControlBar dock="true">
        
<mx:Form styleName="plain">
            
<mx:FormItem label="condenseWhite:">
                
<mx:CheckBox id="checkBox"
                        change
="checkBox_change(event);" />
            
</mx:FormItem>
        
</mx:Form>
    
</mx:ApplicationControlBar>

    
<mx:RichTextEditor id="richTextEditor"
            htmlText
="{str}"
            width
="100%"
            height
="100%" />

</mx:Application>

来自:http://blog.flexexamples.com/2008/04/24/condensing-html-white-space-in-the-richtexteditor-control-in-flex/

posted on 2008-04-25 18:59  『小小菜鸟』  阅读(648)  评论(0编辑  收藏  举报