eWebEditor首页 >> eWebEditor帮助文档 V15.2 >> 开发手册 >> 代码实例

3.10.7 外部样式接口

此例演示了如何使用外部样式引用接口。以实现编辑区与应用系统样式的统一。

此例打包在系统的压缩包例子目录中: example/para_extcss.asp(.php/.aspx/.jsp)

<HTML>

<HEAD>

<TITLE>eWebEditor : 外部样式引用方法示例</TITLE>

<META http-equiv=Content-Type content="text/html; charset=gb2312">

<style>

body,td,input,textarea {font-size:8pt; font-family:Verdana, Arial, Helvetica}

</style>

</HEAD>

<BODY>

 

<p><b>Navigator : <a href="default.asp">Home</a> &gt; 外部样式引用方法示例</b></p>

<p>通过使用外部样式参数接口,你可以指定编辑区的样式。</p>

<p>常用于把编辑区的样式设置为与你的应用系统相同的CSS样式文件,这样保证了编辑器中显示的效果与您的应用系统中输出显示的效果完全相同。</p>

<p>下面的例子,指定extcss=_example/myeditorarea.css,你可以在编辑区中输入一些文字看看,表现效果与myeditorarea.css中定义的是相同的。</p>

 

<FORM method="post" name="myform" action="retrieve.asp">

<TABLE border="0" cellpadding="2" cellspacing="1">

<TR>

     <TD>Content:</TD>

     <TD>

         <INPUT type="hidden" name="content1" value="">

         <IFRAME ID="eWebEditor1" src="../ewebeditor.htm?id=content1&style=coolblue&extcss=_example/myeditorarea.css" frameborder="0" scrolling="no" width="550" height="350"></IFRAME>

     </TD>

</TR>

<TR>

     <TD colspan=2 align=right>

     <INPUT type=submit value="Submit">

     <INPUT type=reset value="Reset">

     <INPUT type=button value="View Source" onclick="location.replace('view-source:'+location)">

     </TD>

</TR>

</TABLE>

</FORM>

 

</BODY>

</HTML>