Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

Conversion and simultaneous displaying of RTF and HTML

What is the best way to have a form that has a field that is RTF and a field that is HTML where you can edit both (if possible) and it would update the other field.
When we talk simultaneously we could do the updating of the other field at the lostfocus event.
Wondering if this is feasible.

Comments

  • Looking at the internet I saw a program that converts from RTF to HTML don't know if this can be used in the situation that I described previously
  • I want to make sure I understand your objective. Ideally, you want two controls on a form: an RTF and an HTML control. You want both to be editable. When content is change in one control, you want the content to be changed in the other control. Am I understanding you correctly?
  • 100 % correct
  • Thank you. Please forgive me because I have some other questions. Is the reason you need to have an RTF and HTML control is because you intend to publish content in both formats? I presume the RTF content will be published via OIPI whereas the HTML format is intended to be published in a browser or as an HTML-formatted email?
  • 100 % correct again. The html is intended to be published as an HTML formatted email?
  • Just noticed that there was a question mark at the end of my sentence that shoould have been an exclamation point
  • While looking on the internet I found this. Can this be converted into a function(SRP Utilities)?
    https://www.codeproject.com/Articles/27431/Writing-Your-Own-RTF-Converter
  • This is .NET, so no, it could not be incorporated into SRP Utilities.
  • I really don't have a solution to propose, at least one that is able to do all that you want out of the box (or close to it). This seems like an R&D project all by itself.

    That said, I can't help but wonder if this project will give you more headaches than you are anticipating. I've seen the same Google search results that show how people are converting between RTF and HTML, but how well does this work?

    Have you even come up with an HTML control that allows direct editing?
  • I know there is none at the moment, but am wondering if you could create one😉
    I know Frank has ask Daniel to talk to you and see if I am smoking or not.
    What we need is the conversation from rtf to html. The control would be a homerun, but I am okay with a single
  • The page you referenced above has a download link which contains source code and command line tools. Perhaps you should try out the included Rtf2Html.exe command line tool on some example RTF files to see how well it converts RTF to HTML. If it works well enough you could then use SRP_Run_Command to call the command line utility from OpenInsight.
  • That sounds like a good approach.
    Let me try that in the morning.
  • to elaborate on my baseball reference we can do this in steps.
    1. conversion from rtf to html
    2. view resulting html in output view
    3. view html in control
    4. edit html control
    5. synchronize rtf with html and html with rtf

    While doing this we can discuss which of these points are feasible or not.
    Also we can make sure which fonts are compatible with both these formats

    you guys let me know if I am dreaming.
    Daniel I have not done the test yet.

Sign In or Register to comment.