JavaScript editor component to embed into java application
I have a largish application written in Java with a Swing UI. I am interesting in adding user scripting via JavaScript. To allow users to edit JS from within the application, I would like to go beyond a simple plain-text JEditorPane, with some kind of syntax-highlighting and smart indentation. The application is LGPL, so the license would need to be LGPL-compatible.
I can use an old version of jedit-syntax (MIT license), but I wonder if there is any actively-maintained project that does something similar, ideally in a maven-aware fashion. I would rather something lightweight - no Eclipse or NetBeans RCPs, thanks.
我没有使用它,但看起来像你需要和维护:http://fifesoft.com/rsyntaxtextarea/
Really good Swing-Editor for JavaScript (and some other languages) is JSyntaxPane. http://code.google.com/p/jsyntaxpane/
It has syntax-highlighting and some other usefull features (line-numbering, parenthesis highlighting). It also can be customized (for example if you have special extensions-keywords).
Editor is Distributed under Apache 2.0. I don'T know whether it's LGPL compatible or not.
I don't know if it can work with Swing, but I would recommend TinyMCE. Since you are on java, try this version or the this implementation and use as provided here
链接地址: http://www.djcxy.com/p/30658.html上一篇: 如何模拟触摸事件?