[Pas2js] How to change a div (or othe widget) content
Michael Van Canneyt
michael at freepascal.org
Mon Oct 3 21:16:25 CEST 2022
On Mon, 3 Oct 2022, Luca Olivetti via Pas2js wrote:
> El 3/10/22 a les 17:35, Michael Van Canneyt via Pas2js ha escrit:
>>> If I use a TTagWidget instead, I can use TextContent (however if I set it
>>> to '' it will keep the previous content).
>> I have changed this.
>> I have also added TextMode as a property so you can choose between
>> and InnerHTML
> Thank you, I saw the commit but...
>>> Currently I'm using a TJSHTMLDivElement and assign its innerHTML.
>>> There are other cases where I had to use an html element instead of a
>>> widget since I could find no way to manipulate the content of the widget.
>>> Is it so by design or am I doing something wrong?
>> Your use of DivHTML (or any other TTagWidget) is correct, but I needed to
>> extend the functionality.
>> If you feel functionality is missing, don't hesitate to say so, and we'll
>> discuss what can be done.
> ...I still see no way to change the content of a TDivWidget.
Sorry, I forgot to publish these properties, TDivWidget descends from
TCustomTagWidget, not from TTagWidget, my bad.
More information about the Pas2js