Giter Club home page Giter Club logo

ueditor.core's Introduction

UEditor.Core

GitHub license UEditor.Core

首先给大家安利另外一个基于UEditor写的富文本框编辑器neditor ,看起来相当不错,不过我还没有来得及尝试!最起码它是基于UEditor的,肯定不会比UEditor差。其次,他的接口没有变化,所以理论上来说,本项目的接口也可以适配到neditor中,有人已经试过了。如果在适配NEditor的过程中遇到什么问题,我也可以协助解决!

作者一直在,只是没有什么太多问题,所以版本更新较少,有ISSUE会第一时间处理,请放心使用

示例代码

使用方法

对于在.NET Core和.NET Framework中使用UEditor,分别有详细的文档,请参阅:

另外,可以参考网络上其他人写的相关文章:

安装

强烈建议从nuget安装

  • 方式1:可以直接在Nuget中搜索UEditor.Core并安装

  • 方式2:通过命令行安装

Install-Package UEditor.Core

Nuget地址:https://www.nuget.org/packages/UEditor.Core/

配置

可选配置项

在注入Service时,可以支持一些可选的配置,具体参数如下:

configFileRelativePath

后端配置文件的相对路径,默认值为ueditor.json,即项目根目录的ueditor.json文件,这个文件是从UEditor官方提供的.NET版本下载包中的utf8-net\net\config.json复制过来的

isCacheConfig

是否缓存配置文件,默认值为true。当设置为不缓存时,每次都会从文件中读取配置文件;当设置为缓存时,则第一次从配置文件中读取,以后都从内存中读取

basePath

相对路径的根目录,默认值为项目的根目录,即env.ContentRootPath。系统中的后端配置文件、各种上传的路径都是基于该地址去计算其实际地址的。

特别注意:

在修改basePath后,一定要注意调整后端配置文件中的imageUrlPrefixscrawlUrlPrefix等等各种文件访问路径的前缀,否则可能出现文件可以上传,但是前端编辑器中总显示不出来的问题。

配置项使用方式

配置项需要在注入Service时设置,示例代码如下:

public void ConfigureServices(IServiceCollection services)
{
   services.AddUEditorService(configFileRelativePath: "config.json",
       isCacheConfig: false,
       basePath: "C:/basepath");
   services.AddMvc();
}

特别感谢

优秀的开源项目离不开大家的支持,非常感谢为以下为本项目提供好的建议或PR的朋友:

大功告成,祝你大吉大利,今晚吃鸡

ueditor.core's People

Contributors

baiyunchen avatar dusdong avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.