<font face...> Problem

  •  11-01-2007, 9:04 PM

    <font face...> Problem

    Using CE 6.0
     
    Using cuteeditor.dll for .net 2.0 you provided from this post (http://cutesoft.net/forums/thread/33881.aspx)
     
    Cute Editor Properties are set to UseFontTags: False, also have in code behind: Editor1.UseFontTags = False
     
    Cute Editor Properties set to: EditorOnPaste="PasteWord"
     
    OnSubmit of Cute Editor am running: Editor1.CleanUpHTMLCode()
    ________________________________________________________________________________________________
     
    All of these settings are doing a great job for managing text when pasted from MS Word. By the time the text gets to the db it is in good shape. No font face issues. Font face that are submitted via word are correctly converted.
     
    But...
     
    If I paste straight from notepad I get a font face tag. This tag is not converted at any point to the correct span tag.
     
    The end result looks like this:
    <p><font face="Times New Roman" size="3">Testing how the text lines up beside an image that has been loaded.</font> </p>
    <p>&nbsp;</p>
     
    **************pasting straight from notepad here just to see what happens*********************
    This line is from notepad!
    *************************************************************************************
     
    In your HTML view there is no font face...interesting. Is that because you are using <div>'s instead of <p>'s?
     
     
    Ideally I would like to lock down the font used to a type I select not allowing the user to paste or select a different font type. Stopping them from selecting a different font was easy, but not allowing them to paste a font type while still allowing formatting tags etc is more difficult. Any ideas on that (I feel I am missing something simple).
     
    I'll keep working on this but if you have any insights please let me know.
     
    DDay
     
    PS: On seeing how your editor here was working I changed EditorOnPaste to "Default" and ran Editor1.CleanUpMicrosoftWordHTML() after Editor1.CleanUpHTMLCode() and this resolved the <font face> issue while still cleaning up after MS Word. It also seems to remove all font style references (which is what I wanted). So I am happy. If you have any suggestions please still respond. I went ahead and posted this because I doubt the behavior I mention above is what you want the CE to do regardless.
     
     
View Complete Thread