Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
5
Erster Beitrag:
vor 4 Jahren, 10 Monaten
Letzter Beitrag:
vor 4 Jahren, 10 Monaten
Beteiligte Autoren:
Mauricio, Fabrice Harari

[WB 17] Show content of RTF Field

Startbeitrag von Mauricio am 20.03.2013 13:34

Hi,
I have a Windev project where I'm editing/showing a rtf field. It's a varbinary(max) in SQL. I can, of course, change fonts, sizes, colors, etc. and I can even paste images inside the field and everything is working fine.
Now I have to show that field in a web page, I've tried with RTFtoHTML and "almost" works fine, text is showed but not the pasted images.
Has anyone a solution/suggestion for this?
Thanks in advance.

Mauricio

Antworten:

Hi Mauricio

I doubt there will be any automatic system... So to achieve what you want, I would first look inside the RTF field HOW the images are stored...

I'm guessing it's some kind of base64 system... Once that is know, I would process the rtf content the following way:
- find each image
- extract the image as an external file with a specific name
- store the text before and after the image, so as to be able to find its position once the text is tranformed in html
- do the rtftohtml
- find the position for the image and insert the corresponding html tag, pointing to the external image file...

-OR-
I woul jus change the windew project so as to directly create the content as HTML :-)

Best regards

von Fabrice Harari - am 20.03.2013 13:59
Thanks for the tips, Fabrice. I like the OR option :)

von Mauricio - am 20.03.2013 14:02
Hi again,
Fabrice, I tried to use the HTML option. I can edit the HTML field with Windev without any problem, here is an image: (image)
However, when I try to see that field with WB, I can only see the text. (WebDev image).
What am I missing? I tried with a static HTML, an edit HTML and a HTML control.
Thanks for your help.

Mauricio

von Mauricio - am 22.03.2013 10:32
I know what's the problem. Html control is saving the path to the image, when I try to see it with the web application can't find them.
Let's see how to fix this :).
Thanks.

von Mauricio - am 22.03.2013 13:02
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.