[Typo3-dev] WYSIWYG Editor
René Fritz
r.fritz at colorcube.de
Thu Aug 7 13:00:13 CEST 2003
> > Mozilla's implementation (Midas,
> > http://www.mozilla.org/editor/midasdemo/) even works on 1.3 (although
> Could anyone than make a statement of what the obstacles and challenges
> will be and what it will take to make it happen?
I made a little research and was able to change the RTE to work a little bit
on Mozilla while it mostly still work on IE.
Currently bold, underline, italic, ident and lists works but this is far from
being usable and I don't see myself to finish it because one need more
JavaScript knowledge than me. I think it would take some days (2?) with good
JS knowledge to make RTE on Mozilla happen.
So what is to do to bring the RTE on Mozilla to life:
- lighning and thunder
- the Mozilla rte have to go into the rte extension because ext/rte/rte.php is
hardcoded in BE code.
- the Mozilla editor seems to me as an implementation of the IE editor for
Mozilla. That means in principle the same JS code could work on both
browsers. Which in fact does for my current results.
- the Mozilla editor lacks some functionality. I read that it is currently not
possible to use an own interface for applying links. Which means the link
browser of RTE will not work.
- Markup is different to IE. That means the html transformation which was
written to clean the ugly html code of RTE have to be reviewed to work with
Mozilla markup which works with <span>
- t3lib_tceforms have to be changed a little bit in function getSingleField
(case "text":) because it needs a bit changed iframe definition depending on
the size
For testing I set
$RTEdivStyle='position:relative; left:0px; top:0px; height:300px; width:500px;
border:solid 0px;';
and
$item.='<iframe width="100%" height="100%" scrolling="no" ....
Somewhere a check for IE is done I simply added for testing
$this->RTEenabled=TRUE;
- extension rte
In priciple I think it should be possible to change rte.js to make it work on
both browsers, but JavaScript is always a nightmare ...
Another possibility is to use rte.php as a wrapper which detects the browser
and include two different versions. I don't like this because you have two
different versions of RTE.
rte.php:
change name="idEditbox" to id="idEditbox"
rte.js:
The t3 RTE is really huge. While the midas demo have 360 lines including HTML
rte.js have 1700 code lines ... :-)
More than the half is rendering the popups.
read http://www.mozilla.org/editor/ie2midas.html
use
document.getElementById("idEditbox").contentWindow.document
than
idEditbox.document.
function drawToolbar()
This is ugly. It shows the RTE icons. The icons are images with more icons in
it. With css clippings only an area is shown. Mozilla shows all icons on the
same position. I made a workaround just to see the icons.
- Readings:
http://www.mozilla.org/editor/midasdemo/
http://www.mozilla.org/editor/ie2midas.html
http://devedge.netscape.com/viewsource/2003/midas/01/
more links in the bottom
http://www.kevinroth.com/rte/demo.htm
editor which works on IE AND Mozilla with the same code
René
--
COLORCUBE
digital media lab
www.colorcube.de
More information about the TYPO3-dev
mailing list