New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
Web Design and Hosting Creating sites, scripting, and hosting discussions.

IE WYSIWYG editing... problems


Post Reply New Thread Subscribe

 
Thread Tools
teknodude
Guest
 
Posts: n/a

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
QUOTE Thanks
Graphite

 
Graphite's Avatar
 
Member Since: Feb 25, 2003
Location: Tropical Island, Jealous?
Posts: 5,279
Graphite has much to be proud ofGraphite has much to be proud ofGraphite has much to be proud ofGraphite has much to be proud ofGraphite has much to be proud ofGraphite has much to be proud ofGraphite has much to be proud ofGraphite has much to be proud ofGraphite has much to be proud of
Mac Specs: MacPro 3.0Ghz 16GB RAM, 4x256 Vid, 30''cinema display

Graphite is offline
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)
QUOTE Thanks
teknodude
Guest
 
Posts: n/a

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...

Quote:
<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
QUOTE Thanks
Graphite

 
Graphite's Avatar
 
Member Since: Feb 25, 2003
Location: Tropical Island, Jealous?
Posts: 5,279
Graphite has much to be proud ofGraphite has much to be proud ofGraphite has much to be proud ofGraphite has much to be proud ofGraphite has much to be proud ofGraphite has much to be proud ofGraphite has much to be proud ofGraphite has much to be proud ofGraphite has much to be proud of
Mac Specs: MacPro 3.0Ghz 16GB RAM, 4x256 Vid, 30''cinema display

Graphite is offline
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.
QUOTE Thanks
muso

 
muso's Avatar
 
Member Since: Jan 15, 2003
Location: Whangarei, New Zealand
Posts: 2
muso has a reputation beyond reputemuso has a reputation beyond reputemuso has a reputation beyond reputemuso has a reputation beyond reputemuso has a reputation beyond reputemuso has a reputation beyond reputemuso has a reputation beyond reputemuso has a reputation beyond reputemuso has a reputation beyond reputemuso has a reputation beyond reputemuso has a reputation beyond repute
Mac Specs: Pwnt

muso is offline
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.
QUOTE Thanks
teknodude
Guest
 
Posts: n/a

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
QUOTE Thanks
Graphite

 
Graphite's Avatar
 
Member Since: Feb 25, 2003
Location: Tropical Island, Jealous?
Posts: 5,279
Graphite has much to be proud ofGraphite has much to be proud ofGraphite has much to be proud ofGraphite has much to be proud ofGraphite has much to be proud ofGraphite has much to be proud ofGraphite has much to be proud ofGraphite has much to be proud ofGraphite has much to be proud of
Mac Specs: MacPro 3.0Ghz 16GB RAM, 4x256 Vid, 30''cinema display

Graphite is offline
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..
QUOTE Thanks
teknodude
Guest
 
Posts: n/a

Quote:
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
QUOTE Thanks
muso

 
muso's Avatar
 
Member Since: Jan 15, 2003
Location: Whangarei, New Zealand
Posts: 2
muso has a reputation beyond reputemuso has a reputation beyond reputemuso has a reputation beyond reputemuso has a reputation beyond reputemuso has a reputation beyond reputemuso has a reputation beyond reputemuso has a reputation beyond reputemuso has a reputation beyond reputemuso has a reputation beyond reputemuso has a reputation beyond reputemuso has a reputation beyond repute
Mac Specs: Pwnt

muso is offline
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.
QUOTE Thanks

Post Reply New Thread Subscribe


« Disable Header printing in NN7 | Re: Displaying graphics »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Memory & Print Problems OS 9.2.2 cvesper Running Windows (or anything else) on your Mac 3 12-18-2004 04:22 PM
A Mac worthy of video editing; what are my options? thendis Other Hardware and Peripherals 2 10-26-2004 12:24 PM
10.3 Problems Darkness falls Switcher Hangout 2 05-20-2004 04:58 AM
HELP! New G4 emac- problems uploading and sending attachments braford Other Hardware and Peripherals 0 02-13-2004 03:19 PM
iBook for video editing? WannaBSwitcher Apple Notebooks 0 02-06-2004 10:05 AM

All times are GMT -4. The time now is 09:44 PM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?