blob: 2928e3bcc6d3062a50ddb24b10e5215c857a3405 [file] [log] [blame]
<?xml version="1.0" encoding="utf-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<s:Skin xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:richTextEditorClasses="spark.components.richTextEditorClasses.*">
<!-- host component -->
<fx:Metadata>
[HostComponent("spark.components.RichTextEditor")]
</fx:Metadata>
<fx:Script>
<![CDATA[
import mx.collections.ArrayList;
import flashx.textLayout.formats.TextAlign;
[Embed(source = "../../../assets/tools/center.png")]
private const CENTER:Class;
[Embed(source = "../../../assets/tools/justify.png")]
private const JUSTIFY:Class;
[Embed(source = "../../../assets/tools/left.png")]
private const LEFT:Class;
[Embed(source = "../../../assets/tools/right.png")]
private const RIGHT:Class;
override protected function createChildren():void
{
super.createChildren();
var dp:ArrayList = new ArrayList();
dp.addItem({icon: LEFT, toolTip: "", value: TextAlign.LEFT});
dp.addItem({icon: CENTER, toolTip: "", value: TextAlign.CENTER});
dp.addItem({icon: RIGHT, toolTip: "", value: TextAlign.RIGHT});
dp.addItem({icon: JUSTIFY, toolTip: "", value: TextAlign.JUSTIFY});
alignTool.dataProvider = dp;
}
]]>
</fx:Script>
<!-- SkinParts
name=textArea, type=spark.components.TextArea, required=true
name=fontTool, type=spark.components.richTextEditorClasses.FontTool, required=false
name=sizeTool, type=spark.components.richTextEditorClasses.SizeTool, required=false
name=boldTool, type=spark.components.richTextEditorClasses.BoldTool, required=false
name=italicTool, type=spark.components.richTextEditorClasses.ItalicTool, required=true
name=underlineTool, type=spark.components.richTextEditorClasses.UnderlineTool, required=true
name=colorTool, type=spark.components.richTextEditorClasses.ColorTool, required=false
name=alignTool, type=spark.components.richTextEditorClasses.AlignTool, required=false
name=bulletTool, type=spark.components.richTextEditorClasses.BulletTool, required=false
name=linkTool, type=spark.components.richTextEditorClasses.LinkTool, required=false
-->
<s:VGroup width="100%" height="100%">
<s:HGroup width="100%" bottom="6">
<richTextEditorClasses:FontTool id="fontTool" width="100%" maxWidth="120" minWidth="80"/>
<richTextEditorClasses:SizeTool id="sizeTool" width="60"/>
<s:HGroup gap="0">
<richTextEditorClasses:BoldTool id="boldTool" width="20" icon="@Embed('../../../assets/tools/bold.png')"/>
<richTextEditorClasses:ItalicTool id="italicTool" width="20" icon="@Embed('../../../assets/tools/italic.png')"/>
<richTextEditorClasses:UnderlineTool id="underlineTool" width="20" icon="@Embed('../../../assets/tools/underline.png')"/>
</s:HGroup>
<richTextEditorClasses:ColorTool id="colorTool" height="21" width="20"/>
<s:Line height="100%">
<s:stroke>
<s:SolidColorStroke color="#B3C2B8"/>
</s:stroke>
</s:Line>
<richTextEditorClasses:AlignTool id="alignTool" width="80" skinClass="spark.skins.richTextEditorClasses.AlignToolSkin"/>
<richTextEditorClasses:BulletTool id="bulletTool" width="20" icon="@Embed('../../../assets/tools/bullet.png')"/>
<s:Line height="100%">
<s:stroke>
<s:SolidColorStroke color="#B3C2B8"/>
</s:stroke>
</s:Line>
<richTextEditorClasses:LinkTool id="linkTool" width="100%"/>
</s:HGroup>
<s:TextArea id="textArea" height="100%" width="100%"/>
</s:VGroup>
</s:Skin>