2011-11-02 31 views
0

我有一个ASP.NET webforms项目,我希望fckeditor使用该网站的样式表,以便没有HTML知识的人可以查看该网站并进行更改。FCKEditor和ASP.NET CSS

这里是我当前的代码:

<fckeditorv2:FCKeditor runat="server" ID="txtPageContent" Height="600"     BasePath="~/FCKeditor/" ForceSimpleAmpersand="false" FormatOutput="false" EditorAreaCSS="../App_Themes/Professional/master.css"></fckeditorv2:FCKeditor> 

正如你所看到的,我已经设置EditorAreaCSS属性,但它仍然无法忍受的样式。

而不是../App_Themes我试过〜/ App_Themes和/ App_Themes但没有。

样式表当然存在,我试着在后面的代码和ASPX文件中设置它。

当源看,我得到这个隐藏字段的FCKeditor使得:

<input type="hidden" id="ctl00_contentMain_txtPageContent___Config" value="ForceSimpleAmpersand=false&amp;EditorAreaCSS=../App_Themes/Professional/main.css&amp;FormatOutput=false&amp;HtmlEncodeOutput=true" /><iframe id="ctl00_contentMain_txtPageContent___Frame" src="/eJs.Web/FCKeditor/editor/fckeditor.html?InstanceName=ctl00_contentMain_txtPageContent&amp;Toolbar=Default" width="100%" height="600px" frameborder="no" scrolling="no"> 

任何想法,将最赞赏。

回答

0

我希望这会有所帮助。可能最好将被从代码中设置它后面

EditorAreaCSS = this.ResolveUrl( “〜/ App_Themes文件/专业/ main.css的”)

RESOLVEURL()方法是页的方法,实际上是任何的System.Web.UI .Control应该有

+0

我试过了,也是/App_Themes/Professional/master.css – Paul

+0

还有其他建议吗? – Paul

+0

我没有看到完整的代码我更新ny答案请检查它,让我知道它是否工作 –