2010年1月10日

網頁內嵌式程式碼編輯器

在網頁上編輯程式碼,經常使用的是一般的純文字編輯,也就是TextArea的表單介面,缺少行號、關鍵字凸顯(Syntax Highlight)等功能,很難撰寫出行數多的程式碼。CodeMirror是一個用JavaScript撰寫的套件,可以使網頁也能提供類似IDE的程式開發編輯器。例如Freebase就是用CodeMirror作為編輯器的基礎,證實CodeMirror可以實際運用。

[CodeMirror] In-browser code editing made almost bearable
Look DEMO (HTML+PHP)

CodeMirror is a JavaScript library that can be used to create a relatively pleasant editor interface for code-like content ― computer programs, HTML markup, and similar. If a parser has been written for the language you are editing (see below for a list of supported languages), the code will be coloured, and the editor will help you with indentation.

沒有留言:

張貼留言

lyhcode by lyhcode
歡迎轉載,請務必註明出處!