Results 1 to 6 of 6

Thread: WYSIWYG Editor Maintain Formatting

  1. #1
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default WYSIWYG Editor Maintain Formatting

    Does anyone know of a wysiwyg editor that maintains the formatting of pasted text (e.g. from word)? It'd also be nice if it could handle images.

    I've tried ckeditor, nicedit, and tinymce. All of these though I've run into some flaws with.

    Thanks.
    Corrections to my coding/thoughts welcome.

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    All of them are bound to have some flaws, but do you mean specifically flaws with pasting formatted text? Did any of them work at all?

    One that I used to use (no need at the moment) is http://www.openwebware.com/ and it doesn't seem to allow pasting formatted text either.

    My guess is that it is not possible because stripping the formatting is probably at the program level (browser) and even if not, you'd need to write a javascript parser for formatted clipboard data and that might be very complex. Directly placing it in a text box would be a different format than html and probably just display as text (strange looking characters).
    Of course if you have html, you can paste that as source code (at least in some of them) but that's not too helpful for what you're describing.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    The ckeditor worked well for the pasting but some of the described functions don't work, the documentation on them is pretty limited, and the forums aren't very active.
    Corrections to my coding/thoughts welcome.

  4. #4
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    At least that's encouraging, since you now know that it's possible.

    I'd recommend investigating why it works in that and trying to maybe adapt its code to work with the others (if the license permits it) or build your own. None of that sounds fun, though.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  5. #5
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    I've used a plugin called "codeprotect" with TinyMCE and that allows custom scrips/formatting/code to remain untouched on-save (TinyMCE doesn't strip it). Maybe that might work for you here?
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

  6. #6
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    Yea, I tried tinymce and they do have some nice features I hadn't seen before but I don't like that it changes your code. The first example of this I noticed was the start tag of ol's it just completely removes it.

    I'm going to try and mash up nicedit and ckeditor I think. I've started a thread in the javascript forum if anyone is interested in this http://www.dynamicdrive.com/forums/s...d.php?p=242743
    Corrections to my coding/thoughts welcome.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •