richedittest.xml

来自「ajax 框价.是个好工具.javascript 矿家.可以用在任何平台.」· XML 代码 · 共 57 行

XML
57 行
字号
<?xml version="1.0"?><Application autoNameMapping="true">	<Window caption="Rich Edit Test" width="320" height="250" centered="true">		<ToolBar id="tb" left="0" top="1" right="0" height="20"				 border="0">			<ToolBarButton id="b1" text="Bold"/>			<ToolBarButton id="b2" text="Italic"/>			<ToolBarButton id="b3" text="Underline"/>			<ToolBarButton id="b4" text="Html"/>		</ToolBar>		<Component border="2 inset" left="0" top="22" right="0" bottom="0">			<RichEdit id="edit" left="0" top="0" right="0" bottom="0">				<RichEdit.contextMenu>					<Menu>						<MenuItem text="Alert HTML"								  onaction="alert( edit.getContentHtml() )"/>					</Menu>				</RichEdit.contextMenu>			</RichEdit>		</Component>	</Window>	<Resources>		<Script><![CDATA[function RichEditTest(){	b1.addEventListener( "action", this.onToolBarAction, this );	b2.addEventListener( "action", this.onToolBarAction, this );	b3.addEventListener( "action", this.onToolBarAction, this );	b4.addEventListener( "action", this.onHtmlButtonAction, this );	this.editor = edit;}RichEditTest.prototype.onToolBarAction = function ( e ){	this.editor.setFocused( true );	this.editor.execCommand( e.getTarget().getText() );};RichEditTest.prototype.onHtmlButtonAction = function ( e ){	//alert( this.editor.getContentHtml() );	this.editor.setContentHtml( "<html><head></head><body>Changed HTML</body></html>" );};RichEditTest.main = function () { new RichEditTest(); };		]]></Script>	</Resources></Application>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?