44
Views
8
Comments
[InjectHTML] HTML to plain text with styling
Question
injecthtml
Reactive icon
Forge component by Jordan Welch

Hi,

I am uploading a html file and in onchange of file upload I am converting Binarydatatotext and I am passing this text to input parameter of INJECTHTML to show the plain text in UI. But INJECTHTML is  for displaying the data, But  I need to store that plain text in DB with all styling. For example like bold, italic etc.


Thanks,

Likith.

Champion

HI @sree likith ,


What the problems are you facing to store that html data into database?

Best

Arun

Hi Arun,

whenever I am passing the HTML content to the InjectHTML component, we are just able to see the text with styling in the UI, in my scenario I need to save the same data into the DB with all stylings. How to pass the text to the DB, I am not getting how to do it.Is there any way I could save all the text with stylings and to retrieve the same data into UI with same styling.



Thanks,

Likith.


Champion

Got it. As you said you are converting Binary to text using BinaryToText action. Now your html text is holding by output parameter of that binary action.

Suppose you have Entity HTMLData and you want to store data in it.

Now you have lot's of way to store this data into DB.

1. At the time of converting data from binary to text, in the same logic you can call HTMLData entity create action to store data in it.

2.You can create one button on the page and on the button logic you call create action of entity to store data.

Let me know if you have and doubts.

Thanks

Arun

Hi Arun,

Still I am facing issues, can you please provide me with a sample oml file.Thanks in advance.

Thanks,

Likith.

Champion
Champion

Hi Sree

PFA oml and let me know if need any clarification.

Thanks

Arun

HTMLDemo.oml

Hi Arun,

Just had gone through the oml file, but my concern is to store in the DB with the stylings and without tags.


Thanks,

Likith.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.