WYSIWYG HTML in 2023 (messy solution and question)

Everything else that doesn't fall into one of the other PB categories.
pamen
Enthusiast
Enthusiast
Posts: 193
Joined: Sat Dec 31, 2022 12:24 pm
Location: Cyprus
Contact:

WYSIWYG HTML in 2023 (messy solution and question)

Post 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?
infratec
Always Here
Always Here
Posts: 7619
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

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

Post by infratec »

pamen
Enthusiast
Enthusiast
Posts: 193
Joined: Sat Dec 31, 2022 12:24 pm
Location: Cyprus
Contact:

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

Post 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.
xpectmore
User
User
Posts: 15
Joined: Thu Jul 29, 2021 12:52 pm

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

Post 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
pamen
Enthusiast
Enthusiast
Posts: 193
Joined: Sat Dec 31, 2022 12:24 pm
Location: Cyprus
Contact:

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

Post 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.
S.T.V.B.E.E.V.
pamen
Enthusiast
Enthusiast
Posts: 193
Joined: Sat Dec 31, 2022 12:24 pm
Location: Cyprus
Contact:

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

Post 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 :)
S.T.V.B.E.E.V.
User avatar
Lord
Addict
Addict
Posts: 907
Joined: Tue May 26, 2009 2:11 pm

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

Post by Lord »

Looks like a bot.
Image
Post Reply