View Full Version : modifying the default WYSISYG
capelton
05-17-2005, 05:29 AM
Ok, my only beef with the default WYSISYG is alignment of the images. I mena i have to hand code that in the html source. But for non- tech people, which i will have, how do i fix this. Basically, is there a way to to just include a simple justification (right and left) for an image, thats all really. DevEdit has it and loads of more complex formatting options. But should,nt this include some basic alignment of images?
just curious thats all (i have to many questions)
Chris S
05-18-2005, 03:10 AM
Hi,
You can drag the image around, but that doesn't really help alignment. We're working on an updated editor so this should be solved in future versions.
Ok, my only beef with the default WYSISYG is alignment of the images. I mena i have to hand code that in the html source. But for non- tech people, which i will have, how do i fix this. Basically, is there a way to to just include a simple justification (right and left) for an image, thats all really. DevEdit has it and loads of more complex formatting options. But should,nt this include some basic alignment of images?
just curious thats all (i have to many questions)
aleon
05-19-2005, 11:30 AM
If you edit the function called doCommand in the editor1.html....you can add
} else if (aName == "JustifyRight") {
if (foo.document.selection.type == "Control") {
var oControlRange = foo.document.selection.createRange();
if (oControlRange(0).tagName.toUpperCase() == "IMG") {
selectedImage = foo.document.selection.createRange()(0);
oControlRange(0).align = 'right';
//return true;
}
} else {
getIFrameDocument('foo').execCommand(aName,false, aArg);
}
this captures if an image is selected and aligns the image tag rather than the div or p tag
Hope this helps
Bjones
05-19-2005, 11:26 PM
Along these lines, is there some way the code can detect a Mac user and display the "light" editor instead of the DE editor? The light editor seems to work fine on the Mac ... but I don't want PC users to be deprived of the rich features of the enhanced editor that AL now has.
capelton
05-20-2005, 01:27 AM
sounds nice, thanks, but i doubt i will ever get this working - anyways u guys have abeen a major help and inspiration
Bjones
05-20-2005, 02:27 AM
Well, might be a moot issue.
When editing the source code view in firefox, there are still a lot of problems.
Would still like a version of the WYSIWYG editor that works on the Mac and in Firefox, and the ability of the code to detect which editor works where.
Along these lines, is there some way the code can detect a Mac user and display the "light" editor instead of the DE editor? The light editor seems to work fine on the Mac ... but I don't want PC users to be deprived of the rich features of the enhanced editor that AL now has.
Chris S
05-20-2005, 03:38 AM
Wow, that's awesome :)
Thanks for the mod...
If you edit the function called doCommand in the editor1.html....you can add
} else if (aName == "JustifyRight") {
if (foo.document.selection.type == "Control") {
var oControlRange = foo.document.selection.createRange();
if (oControlRange(0).tagName.toUpperCase() == "IMG") {
selectedImage = foo.document.selection.createRange()(0);
oControlRange(0).align = 'right';
//return true;
}
} else {
getIFrameDocument('foo').execCommand(aName,false, aArg);
}
this captures if an image is selected and aligns the image tag rather than the div or p tag
Hope this helps
Chris S
05-20-2005, 03:53 AM
Hi,
You could try this new file - backup before you start of course.
It replaces the admin/includes/classes/class.editor.php file.
I haven't tried it, but let us know how it goes..
Along these lines, is there some way the code can detect a Mac user and display the "light" editor instead of the DE editor? The light editor seems to work fine on the Mac ... but I don't want PC users to be deprived of the rich features of the enhanced editor that AL now has.
Bjones
05-20-2005, 09:52 PM
Hey, that swithes editors depending on IE or Firefox on a PC ... now I just need my Mac friends to try it out.
THANKS!
Brian
Hi,
You could try this new file - backup before you start of course.
It replaces the admin/includes/classes/class.editor.php file.
I haven't tried it, but let us know how it goes..
Chris S
05-23-2005, 03:05 AM
Hi Brian,
Should work the same on a Mac.. :)
Hey, that swithes editors depending on IE or Firefox on a PC ... now I just need my Mac friends to try it out.
THANKS!
Brian
brandondrury
01-05-2006, 08:21 PM
Has anyone tried the mod to allow image alignment?
I'm not comfortable enough with the source code in Articlelive to jump in headfirst yet.
Brandon
Jordie (Interspire Staff)
01-06-2006, 01:21 AM
I just added it and it works, but only in IE. I couldn't get it to work for FireFox. Although Javascript isn't my strongest language!
Shoot me a trouble ticket and I'll pass it onto you, I don't want general people from the public to be able to download it!