WebBrowser control as Editor With RitchTextBox For Code??

hi..Everybody..

I have make WebBrowser like html editor..which i have take the code of that from some site..But the question is how i can make the html editor with RitchTextBox run syncronizelly..Like Exactly MS-FrontPage..2003..i want like when i type any character on WebBroswer Editor..i want to render each character writen to RitchTextBox..

basically like ms frontag page way..

Kind Regards..

Bassam Basamad




Answer this question

WebBrowser control as Editor With RitchTextBox For Code??

  • bwagner

    You want to synchronize the Html source code or content

    I don't really understand your question.


  • Stephen S.

    On the TextChanged event of you html source TextBox you just update the content of the other view.


  • carlisle

    You could simply write out the value of your RichTextBox to an internal variable before rendering the HTML. When you go back to the RichTectBox, set it back to the value of your variable and the formatting should be the same as it was before you left the form.

  • Donal McWeeney

    Yaah...thats good,But...

    I have made like you said..onTextChange..but the problem..is when i write the html code in TextBox or RitchTextBox..for example:
    <table>
    <tr>
    <td>
    </td>
    </tr>
    </table>

    This example i wrote it in Html Source Code which is in TextBox or(RitchTexBox)..See that the TextBox and RitchTextBox...Save the 'Enter' which is '\n' in TextBox or RichTexBox..let's now when i switch to Design Mode it render the Html..true..But the problem is when i come back to Source Code..i see that 'Enter' which is '\n' removes from TextBox or RitchTexBox..it come like this..:

    <table><tr><td></td></tr></table>

    What i want to do is saving the state of that structure that i have written in Source Code...Exactly what MS-FrontPage Do..please go MS-FrontPage 2003 and see that..it will be clear..if my explain not clear..

    Thanks..

    Kind Regards..

    Bassam Basamad..



  • iiiwabibitoiii

    I geus you have to write your own parser. You can render Html on the input of a Rich Text format.

    If you want a fancy editor, you have to write that code for yourself.


  • John Cole

    hi..thanks for reply..

    i want when i write on Desing View (Content)..the html code be written to source code view..



  • Dave Midgley

    Sorry..SeanKornish can you clear you reply..you said.. i have to save the value of RitchTextBox before i go to Design View..to make edition to my html page..so when i come back to source code(RitchTexBox) i read the values that i haved saved before in variable and put it in that RitchTexBox..Did you mean that.. if yes..so i have made changed in Design View..for example if have delete all text that in RichTexBox..so the text in variable will be not neeeded..

    Can you give example..or something to be clear how it will be come

    Thanks.



  • WebBrowser control as Editor With RitchTextBox For Code??