emanuelefricano93 / frxjs-Ngx-Timeline

NgxTimeline Angular Library
28 stars 9 forks source link

Issue for the description #31

Closed Monali-Zala closed 7 months ago

Monali-Zala commented 7 months ago

tmp_9c9b9c1a-2d50-40e2-80c2-9727babec3e6

Monali-Zala commented 7 months ago

In the description , It is store in database with html tags but I want to show the text with the formatting according to that tag. Example:

  1. Done So It should look like this
emanuelefricano93 commented 7 months ago

Hello @Monali-Zala this should not be really an issue with the library anyway a solution you could use is using the innerHTML inside a ng template

<ng-template #myTemplate>
  <div [innerHTML]="htmlString"></div>
</ng-template>

You should create an ng-template and then set your tag html that comes from the DB inside a string "htmlString" for instance. Then you should provide this template to the library :) try with this approach please and let me know

Monali-Zala commented 7 months ago

Hello I used this approach <ng-template #myTemplate> <div [innerHTML]="htmlString">

But not working as I expected.

emanuelefricano93 commented 7 months ago

Ok I understand what you need, I can try to work on a new feature that will be released in the v17.0.4

emanuelefricano93 commented 7 months ago

I'am working on the update

I have created this new input to allow you to provide your custom template

image

This is an example of template, since you have some tags with html and some with no html, you are forced to created a template for each event and then provide it as input as this image

image

image

With this result

image
emanuelefricano93 commented 7 months ago

Closing with v17.0.4