Results 1 to 9 of 9
  1. #1
    teknodude
    Guest
    IE WYSIWYG editing... problems
    I have developed a WYSIWYG editor that will only work in IE, due to it's use of IE's proprietary features (e.g. document.designMode and document.execCommand('bold', false, null)). Now, it works fine in IE6 on the PC (and should in theory work no problem on IE5), but when opened in IE5 on a Mac it doesn't work :-S

    Does anyone know why this is? Does IE on the Mac not support the WYSIWYG editing that IE on the PC allows you to achieve through IE's proprietary scripting?

    TIA for your help folks

    teknodude

  2. #2
    IE WYSIWYG editing... problems
    Graphite's Avatar
    Member Since
    Feb 25, 2003
    Location
    Tropical Island, Jealous?
    Posts
    5,279
    Specs:
    MacPro 3.0Ghz 16GB RAM, 4x256 Vid, 30''cinema display
    Hmm, your going to have to give us more information about the codeing of the program... because mac is different from Windows.. and OSX is even more different (PC hasnt had time to copy mac well enuf yet, like they did with classic)

  3. #3
    teknodude
    Guest
    Huh ... well I don't want a PC vs Mac rant, lol

    But here's the code that's not working on IE on the Mac...

    <a href="javascript: format_bold();" onfocus="this.blur()" onmouseover="window.status='bold'; return true;" onmouseout="window.status=''; return true;"><img src="../../images/icons/icon_bold.gif" width="23" height="22" vspace="5" alt="bold" border="0"></a><br>
    <iframe name="f_intro_content" marginheight="0" marginwidth="0" frameborder="0" style="border: 1px solid #C0C0C0; width: 450px; height: 150px"></iframe>
    <script language="JavaScript">
    var edit_frame = document.f_intro_content;

    <?php
    for($x = 0; $x < @count($existing_intro_content_source); $x++){
    ?>
    edit_frame.document.write("<?= @addslashes(@trim($existing_intro_content_source[$x])) ?>");
    <?php
    }
    ?>

    function init(){
    edit_frame.document.designMode = 'On';
    }

    function format_bold(){
    edit_frame.document.execCommand('bold', false, null);
    }

    function get_source(){
    document.f_intro_content_source.f_source.value = edit_frame.document.body.innerHTML;
    }

    init();
    </script>
    The code basically writes the existing content to the IFRAME and then makes the IFRAME editable. The user should then be able to edit the text in the IFRAME and format, in this example they should be able to select text and make it bold.

    Thanks for your help,

    teknodude

  4. #4
    IE WYSIWYG editing... problems
    Graphite's Avatar
    Member Since
    Feb 25, 2003
    Location
    Tropical Island, Jealous?
    Posts
    5,279
    Specs:
    MacPro 3.0Ghz 16GB RAM, 4x256 Vid, 30''cinema display
    Im pretty shur that code will not work for mac.. because frame.document.exec.. wont be read the same.. i theory it should work, but i dont think it will.

  5. #5
    IE WYSIWYG editing... problems
    muso's Avatar
    Member Since
    Jan 15, 2003
    Location
    Whangarei, New Zealand
    Posts
    2
    Specs:
    Pwnt
    So its not a WYSIWYG problem, its just differences in coding support between browsers? I agree with graphite.
    I'm in your forums, writing sentences in a grammatically acceptable manner.

  6. #6
    teknodude
    Guest
    So... IE on Mac does not support the MSHTML scripting features that I'm using, correct? Is there any way around this?

    Thanks for your help so far,

    teknodude

  7. #7
    IE WYSIWYG editing... problems
    Graphite's Avatar
    Member Since
    Feb 25, 2003
    Location
    Tropical Island, Jealous?
    Posts
    5,279
    Specs:
    MacPro 3.0Ghz 16GB RAM, 4x256 Vid, 30''cinema display
    I really dont know what IE for mac supports.. I would not be surprised if IE just slapped it together and skipped out alot. There are sites which require a PC with IE to view them.. (course there are ways around it like OmniWeb, but they never turn out rite) So I would believe it to be true that IE for mac does not support MSHTML.. I could still be wrong about all this and you may just be missing a lead in or somthing, or a minor lead in variable..

  8. #8
    teknodude
    Guest
    Originally posted by Graphite
    I really dont know what IE for mac supports.. I would not be surprised if IE just slapped it together and skipped out alot. There are sites which require a PC with IE to view them.. (course there are ways around it like OmniWeb, but they never turn out rite) So I would believe it to be true that IE for mac does not support MSHTML.. I could still be wrong about all this and you may just be missing a lead in or somthing, or a minor lead in variable..
    Ok... so I think we've established that when it comes to IE on the Mac, the MSHTML component is screwed. Any ideas on alternatives folks? My client really needs this WYSIWYG feature and I need to be able to customise as he won't require all WYSIWYG controls (i.e. bold, italic, underline, colour) on every WYSIWYG feature.

    teknodude

  9. #9
    IE WYSIWYG editing... problems
    muso's Avatar
    Member Since
    Jan 15, 2003
    Location
    Whangarei, New Zealand
    Posts
    2
    Specs:
    Pwnt
    Can you do it through a form, and have the browser display the preview up the top and an option to edit it underneath that? That shouldn't be too hard with a little bit of php or perl. It would be more cumbersome than what you want to do at the moment (if I'm grasping the concept correctly), but should work on all browsers.
    I'm in your forums, writing sentences in a grammatically acceptable manner.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. WYSIWYG software maker...
    By iWheeler in forum OS X - Apps and Games
    Replies: 4
    Last Post: 01-15-2015, 10:35 AM
  2. WYSIWYG iOS Apps
    By evangelist6589 in forum iOS and Apps
    Replies: 0
    Last Post: 08-12-2012, 09:38 PM
  3. Best WYSIWYG Editor
    By brian515 in forum Web Design and Hosting
    Replies: 5
    Last Post: 05-19-2010, 04:52 PM
  4. WYSIWYG html editor
    By matthewjlewis in forum Web Design and Hosting
    Replies: 9
    Last Post: 06-04-2009, 08:34 PM
  5. Wysiwyg
    By Kristina in forum OS X - Apps and Games
    Replies: 5
    Last Post: 03-30-2006, 01:07 PM

Posting Permissions

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