Recent

Author Topic: ThtmlPort Component not working properly on FPC 3.0.  (Read 2956 times)

toplek

  • Jr. Member
  • **
  • Posts: 53
ThtmlPort Component not working properly on FPC 3.0.
« on: May 27, 2016, 09:34:46 am »
Hi,

I have just upgraded Lazarus from FPC 2.6.4 to 3.0, the component ThtmlPort is compiling properly but some below tags are not interpreter properly:

- &nbsp
- <FONT color=blue></FONT>
- etc.

do you have an idea how to fix the problem ?

br
Piort Polok

bulrush

  • Jr. Member
  • **
  • Posts: 86
Re: ThtmlPort Component not working properly on FPC 3.0.
« Reply #1 on: June 06, 2016, 09:44:07 pm »
That's not valid HTML. The HTML would be:
Code: Pascal  [Select][+][-]
  1. <font style="color:blue;">blah </font>
  2.  
Lazarus 1.6.0, FPC 3.0.0, Win 7 64-bit, current Perl programmer.

lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Re: ThtmlPort Component not working properly on FPC 3.0.
« Reply #2 on: June 07, 2016, 12:16:46 am »
Don't rely too much on that component, maybe your code works outside it.

Better use other web browser solution.
« Last Edit: June 07, 2016, 12:19:26 am by lainz »

wp

  • Hero Member
  • *****
  • Posts: 11858
Re: ThtmlPort Component not working properly on FPC 3.0.
« Reply #3 on: June 07, 2016, 12:48:10 am »
Did you try the TurboPower IPro browser (TIpHtmlPanel). It comes with Lazarus which uses it to display the HTML-formatted popup hints. It does have some bugs of its own, but it can handle the font attributes event with the unquoted color value (I just tested it).

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: ThtmlPort Component not working properly on FPC 3.0.
« Reply #4 on: June 07, 2016, 02:38:12 am »
I have just upgraded Lazarus from FPC 2.6.4 to 3.0, the component ThtmlPort is compiling properly but some below tags are not interpreter properly:

I assume you're using this package:

http://wiki.lazarus.freepascal.org/THtmlPort

If so, the bugs you report have probably always been there; I doubt if upgrading FPC made any difference.

It appears from the wiki page that there's another port of David Baldwin's original components. Are you (or anyone else) familiar with it? I did the original port to Lazarus (THtmlPort), but never used it since it never felt like something that would be usable in production code in the 21st century. I'm not familiar with the other port at all. Perhaps it works better in Lazarus.

Certainly one of the biggest limitations of LCL is that it doesn't have a decent Web browser control that supports the current HTML spec, CSS, and JavaScript. When I wanted to create a demo for my GIS article that used a browser control, I had to resort to creating a Mac-only version in Swift to get what I wanted.

(Articles: https://dl.dropboxusercontent.com/u/28343282/MacXPlatform/PascalDynLibs.html)

(Screenshot of what I mean by a real Web browser control in action:  https://dl.dropboxusercontent.com/u/28343282/MacXPlatform/SwiftCast.jpg)

-Phil

 

TinyPortal © 2005-2018