如何运行CKeditor [英] How to run CKeditor
问题描述
我是相当新的javascript,只是克隆(静态)CKeditor repo来搞砸。我不知道如何运行它!没有明显的'main'文件,我运行的所有节点都抛出引用错误。任何帮助将不胜感激。
I'm fairly new to javascript and just cloned the (static) CKeditor repo to fiddle with. I can't figure out how to run it! There is no obvious 'main' file and everything I run with node throws reference errors. Any help would be appreciated!
https://github.com/ckeditor/ckeditor-dev/tree/stable
推荐答案
正如其他人所说, CKEditor不是独立的Node.JS的应用程序,而是现有页面的附加组件。因此,首先需要创建一个将在Node.JS中运行的Web服务器,然后将CKEditor作为由该Web服务器生成的页面的一部分加载。
As others mentioned, CKEditor is not a standalone Node.JS's app, but an addon for your existing page. So first you need to create a web server which will run in Node.JS and then load CKEditor as a part of page generated by that web server.
Node.JS只是一个JavaScript运行时,所以它不是一个Web服务器本身(例如PHP运行在Apache上)。但是,使用Node.JS创建Web服务器非常容易。例如。您可以查看 Express框架 - 请参阅入门指南 a>。
Node.JS is just an JavaScript runtime, so it is not a web server itself (like e.g. PHP running on Apache). However, it's very easy to create web server with Node.JS. E.g. you can check the Express framework - see getting started guide.
所以你有一个Web服务器。现在,您可以将CKEditor下载到Express生成的应用程序的 public /
目录中(请参阅 http://expressjs.com/guide.html#executable ),然后您应该按照 CKEditor加载指南在Express生成的页面上初始化它。
So you've got a web server. Now you can download CKEditor to the public/
directory of your app generated by Express (see http://expressjs.com/guide.html#executable) and then you should follow the CKEditor loading guide to initialize it on page generated by Express.
最后一步是存储在CKEditor中创建的数据。您可以在Express的指南中找到将Express与 Redis 数据库集成的一些基本示例,但实际上有许多数据库和许多Web服务器框架for Node,因此您需要先进行一些研究,哪些将满足您的需求。
The last step is to store data created in CKEditor. You'll find some basic examples of integrating Express with Redis database in the Express' guide, but in fact there are many databases and many web server frameworks for Node so you need to make some research first, which ones will satisfy your needs.
这篇关于如何运行CKeditor的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!