How to run CKeditor [closed]

心已入冬 提交于 2019-12-24 19:07:28

问题


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


回答1:


CKEditor is a rich text editor library for the browser. It is not designed (and would have no use) in the Node.js environment.




回答2:


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 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.

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.

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.



来源:https://stackoverflow.com/questions/16703258/how-to-run-ckeditor

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!