• 在 Asp.net 中使用 FCKEditor


    1.介绍

    FCKeditor是一个专门使用在网页上属于开放源代码的所见即所得文字编辑器。它志于轻量化,不需要太复杂的安装步骤即可使用。它可和PHP、JavaScript、ASP、ASP.NET、ColdFusion、Java、以及ABAP等不同的编程语言相结合。“FCKeditor”名称中的“FCK” 是这个编辑器的作者的名字Frederico Caldeira Knabben的缩写。

    2.使用

    下载地址

    3.使用方法

       (1) 解压文件,将文件夹放于网站根目录下。

       (2)  配置FCkeditor配置文件位于解压问文件中的config.js文件内

       (3)  配置网站的web.config文件加入如下节点:  

    <appSettings>
        <add key="FCKeditor:BasePath" value="~/fckeditor/"/>
        <add key="FCKeditor:UserFilesPath" value="~/UpLoadFile/" />
      </appSettings>

      (4) 配置具体功能在config.js文件中

    FCKConfig.ToolbarSets["Default"] = [
        ['Preview','-','Templates'],
        ['Cut','Copy','Paste','PasteText','PasteWord','-','Print'],
        ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
        ['TextField','Textarea','ImageButton'],
        '/',
        ['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'],
        ['OrderedList','UnorderedList','-','Outdent','Indent','Blockquote','CreateDiv'],
        ['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
        ['Link','Unlink','Anchor'],
        ['Image','Flash','Table','Rule','Smiley','SpecialChar','PageBreak'],
        '/',
        ['Style','FontFormat','FontName','FontSize'],
        ['TextColor','BGColor'],
        ['FitWindow','ShowBlocks']        // No comma for the last row.
    ] ;

    以上为提供的工具栏,可以自定义

    4. 注意

     如若上传文件出现问题,查看web.config文件的配置信息。

    <add key="FCKeditor:UserFilesPath" value="~/UpLoadFile/" />

      

    博客不易,转载请注明出处。Binarysoft.
  • 相关阅读:
    javaee_正则表达式基础和常用表达式
    hello2源代码分析
    servlet_filterj简介
    hello1的web.xml解析
    Annotation
    注入(Injection)
    容器(Container)
    Building Tool(Maven/Gradle)
    JavaWeb的历史与发展趋势
    Build Tools
  • 原文地址:https://www.cnblogs.com/BinaryBoy/p/2849091.html
Copyright © 2020-2023  润新知