Page 1 of 1

WYSIWYG HTML in 2023 (messy solution and question)

Posted: Tue Jan 03, 2023 6:19 pm
by pamen
Well, it is not exactly simple, as PB does not have rich text edit capabilities, which are
1. Easy
2. the same on each platform
3. do not involve scintilla 1000 functions and callbacks
4. support pictures, rich formatting and all that end- user mess, needed for pretty documents , emails and so on.
5. handle all possible 100+ character sets and UTF correctly (yes, in many countries they use national character sets still in web content and emails)

Solution which seem to work with PB just fine

Presentation and editing:
use ckeditor 4 on windows platforms and set IE emulation to IE 11 (no idea what happens after Feb. 203 when MS retires IE permanently)
use ckeditor 5 on other platforms (newer webkit is needed, search the forum)
create html files with ckeditor and insert your html file into the <editor> div.
Edit at will.

for Getting the sanitized and edited content:
use any of the java script callbacks (on Webkit - there are solutions on this forum, on IE - haven't yet found it, but using windows API does work in other languages, so it will work with PB)

Downsides:
- obviously terrible memory hog (RTF with HTML-RTF-HTML converter would be much much better for presentation and editing)
- lots of additional files to distribute and maintain. No more single executable :-(
- switching ckeditor for different platforms and watching how it becomes obsolete or incompatible

Question:
Any chance for a unified rich-text editing platform like chromium or RTF (not "Webview" - this is is utterly Windows only) in the near future?

Re: WYSIWYG HTML in 2023 (messy solution and question)

Posted: Wed Jan 04, 2023 11:08 am
by infratec

Re: WYSIWYG HTML in 2023 (messy solution and question)

Posted: Wed Jan 04, 2023 11:27 am
by pamen
First example is restricted to Window only: SendMessage uses WindowsAPI constants (#EM_SETCHARFORMAT, #EM_SELCHANGE and so on are WinAPI specific, to my knowledge).
Second is nice, but miles away from doing usable editing and handling formatting needs for even simple formatted document (email in my case) on a level users are used to.

The main appeal of PB to me is that it compiles native executables for several OSs.
I do windows programming for a living and .NET components have there all imaginable UI components and are fast enough.
As GTK and QT are far from convenient for rapid development, PB is a truly great choice (even if UI has to be done 80% "by hand" and consider differences in subsystems and OS peculiarities)

Please do correct me if I'm wrong, I'm new to PB - 4 weeks of programming is not much to understand all the nuts and bolts of PB.

Re: WYSIWYG HTML in 2023 (messy solution and question)

Posted: Tue Jan 10, 2023 2:07 pm
by xpectmore
use the crap i posted here
viewtopic.php?t=76139&start=15

and use web gadget local ,relative to a folder combined with eg: code mirror 5 , wysiwyg html area , or any bootstrap builder, css generators ..
all html 5+ some css +js framework ,etc etc

Re: WYSIWYG HTML in 2023 (messy solution and question)

Posted: Tue Jan 10, 2023 4:48 pm
by pamen
Thank you xpectmore
I solved all the Windows issues already - there are none, to be honest, the solution requires even much less Windows Code to use ckeditor inside PB.
Now I'm struggling only with Webkit on Linux and raspberry, where I cannot run javascript on built-in Webkit,
or if I can (using WebkitEx / Webkit 4) then the loaded scripts work only partially due to unknown reasons and clicking on any buttons fails.

Edit:
The real issues are here:
viewtopic.php?p=593568#p593568

Greetings and Grüße aus Zypern.
P.

Re: WYSIWYG HTML in 2023 (messy solution and question)

Posted: Sun Jan 15, 2023 8:04 am
by pamen
Hi jemsnixon,
what is the point of adjusting my own post and paraphrasing it using slightly different vocabulary?
Is it a hint to improve my English skills?
I'm looking for solutions and help here, but will gladly accept linguistic advise as well :)

Re: WYSIWYG HTML in 2023 (messy solution and question)

Posted: Sun Jan 15, 2023 11:36 am
by Lord
Looks like a bot.