WYSIWYG / HTML editor
-
Does anyone know a good WYSIWYG HTML/rich text editor? I see this old example application https://doc.qt.io/qt-5/qtwidgets-richtext-textedit-example.html but I am looking for a widget that is closer to ready to drop in and go.
I know QTextEdit does HTML but I need the toolbar for styling, inserting links and so on.
-
@HamishM said in WYSIWYG / HTML editor:
Does anyone know a good WYSIWYG HTML/rich text editor?
HTML5 is extremely complex; it's not feasible to have an editor bundled in a widget. You'd need an entire web engine, really.
If you can live with a subset of HTML4, then it's more feasible.
I know QTextEdit does HTML but I need the toolbar for styling, inserting links and so on.
I'm not aware of any ready-made toolbars that can be embedded into a Qt project. You likely need to implement the toolbar yourself.
-
@HamishM said in WYSIWYG / HTML editor:
I just need to allow the users to enter some basic text with some styling and insert links. Like the example app but a bit more polished.
I'm surprised someone hasn't made a nice widget for this. We'd be happy to pay for something commercial.
My suggestion if nobody offers you their services: Copy the example's
textedit.h
andtextedit.cpp
into your project. Then edit it to make it inheritQWidget
instead ofQMainWindow
. Fix any compilation errors and remove the functions that you don't want (like file saving/loading/printing). That should give you your baasic widget, right?(The example is available under the BSD license, so you can freely use it in your project)