A text editor widget that supports syntax highlighting, links, and spell checking online

I am looking for an embeddable text editor widget / component that supports syntax highlighting, links, and online spell checking (for example, in modern web browsers and text editors, that is, without having to click the "Spell Check" button).

My application uses Java and SWT, so I can use any Java-based text editor or JavaScript HTML code (using the Browser widget that supports WebKit). It is also possible to embed Swing editors.

The solution should work on at least three major platforms (Win, Mac, Linux).

+6
source share
3 answers

All this!

  • JSyntaxPane is EditorKit for JEditorPane (Swing) , i.e. you can just connect it to an existing edit panel.
  • Jazzy Swing is the SpellChecker library for Swing, which can be connected independently of JSyntaxPane, i.e. you can use them together with standard widgets (like JEditorPane).
  • JEditorPane is already able to display links. The following is an example on how to use hyperlinks with JEditorPane.

Of course, this solution is aimed primarily at Swing Applications, but, as you said, Swing is not a problem for you, it seems like viable options.

+2
source

http://jintilla.sourceforge.net/ is the Java SWT and AWT port of Scintilla

The project looks outdated, but it might be a good starting point.

+1
source

There is also a jEdit cross platform. Although I don’t see any documentation saying that it has a spell check function. Update . There is a spell checker plugin for jEdit .

Emacs, if you learn its keyboard shortcuts, this is truly amazing, although it takes a little time to get it working with Java (if you don't want to use the command line and instead want to use a keyboard shortcut to compile and run java applications). It has versions for each OS mentioned.

Windows only

TextPad was the standard for text editors supporting java and working with java immediately after installation, it also has various dictionaries to suit your needs. The application is very mature and no longer changes for this reason.

On a Windows computer, I will probably go with TextPad, I personally now use Programmers Notepad 2 , however it does not support spell checking, and I actually am no better than TextPad.

0
source

Source: https://habr.com/ru/post/897078/


All Articles