Edit - problem solved, bounty off.
As nobody seemed to be interested - here is a bounty hunt, not much, but hopefully an incentive
For completely solving the issue below (LINUX/ Raspberry only, not Windows!)
I'm happy to donate 100 EUR to your paypal or whatever the bank you have and also send you the final product, when ready in around 4 months.
Task to fully solve: Webkit (either built-in or Webkit4) must run: java with string return, callbacks for links and also all scripts working when using local html and .js files.. With nocrashes or memory leaks, as a matter of course.
Full text:
Dearest Developer
I hope one of you, Linux Gurus can solve this problem.
I'm posting on advice from mk-soft, who could not find a solution.
Condensed version:
Possibly due to site security - javascript functions in local file is being blocked on Webkit 4 (as things work differently for file:// vs. about:blank vs http(s)://). Webkit standard(2?3?) does not block but has no javascript support in PB.
Run WebGadgetSampleLinux.pb and see it fails when clicking any ckeditor buttons or combos
... but does not fail to run java in general - check menu GetHTMLCode !!!
Remove Webkit_Init in there to use standard webkit from PB and it runs ckeditor fine (but no java - no interaction)
For comparison run WebGadgetSampleWin.pb on Windows and it is fine, (unless in code Silent is set or emulation version is wrong).
Download whole issue example including preconfigured editor:
URL: https://seafile.mandalian.net/f/bc381d ... 8fba/?dl=1
Password:PureBasic6
Longer version:
WEBKIT (all Linux 32, 64, Raspberry 32 / 64):
When using standard component, the ckeditor works fine.
Unfortunately I'm not able to run javascript (and get string returns), which is essential for editing and interaction.
When using (otherwise great) extension for webkit 4 (mk-soft one: WebkitEx.pb) running javascript from the actual html include only works when hosted on a web server, not local file.
For security reasons, I do not want to run java script on externally loaded content (so javascript disabled) ,
but must run it on locally loaded HTML to be able to properly interact with the content.
Comparison: Windows / WebGadget (windows 11/64 through Windows 7/32 - all are fine):
Editing and runniing file based javascript works correctly when using standard component..
To still run java script and get return values set emulation and use forum post (included IE7Javascript.pb (thank you, Forum!)
Caveat: Setting IE to silent via WinAPI disables all edit buttons (just like WebkitEx !). Solution I humbly deployed: at the top of the file add javascript to ignore errors, which silences the IE instance and also allows to interact with the page correctly.
Code for that is more than simple:
just after </head> and before <body> - to make sure it is the first executed script:
<script type="text/javascript">
window.onerror = function (e) { return true; }
</script>
Note Not a solution,
Build you own embedded web server or fancy publishing and word processing package, just to *avoid* the problem instead of solving it.
Thanks!
BOUNTY - 100 EUR appreciation and a copy of final product - Webkit Linux issue with local file
BOUNTY - 100 EUR appreciation and a copy of final product - Webkit Linux issue with local file
Last edited by pamen on Tue Feb 14, 2023 8:45 am, edited 3 times in total.
S.T.V.B.E.E.V.
Re: Webkit 4 (Ex) Linux issue with local file
Apologies
Link was wrong -it should have been https. Corrected.
Link was wrong -it should have been https. Corrected.
S.T.V.B.E.E.V.
Re: BOUNTY - 100 EUR appreciation and a copy of final product - Webkit Linux issue with local file
After some tinkering the problem is gone - editing works on Linux and raspberry with no special changes.
Webkit GTK 4 needs to be installed and used.
Webkit GTK 4 needs to be installed and used.
S.T.V.B.E.E.V.