From: Leif W <war...@us...> - 2004-02-04 18:34:00
|
Hi, I'm trying to give this a shot, but am stuck on some DOM2 event handling stuff. Basically in Opera there's no text ranges, so we need to kludge some other way to convert mouse coordinates to text coordinates within a textarea, then if we could just do that, it's pretty easy to write string based insert functions. I was thinking if we could use a DOM2 MouseEvent tied to the TextArea, and access clientX and clientY (but not sure if they're specific to the TextArea like I am thinking, or to the document like I am hoping is not the case, as then we have to find and compensate for the offset of the TextArea), then we might have a chance of concocting some cocamany algorithm for converting font size pixels back to text coords. May need some restrictions on the editor, like a fixed-width font in the textarea, (at least to simplify the prolem in the beginning) or else the algorithm just relies on averages and hopes for the best. I know it's a longshot, but what other alternatives might there be? Could a Java plugin compensate for a browser's lack of DOM TextRanges by getting access to the correlating the mouse position, over a TextArea, when selecting, start and end coordinates of text characters within the TextArea's string? Leif ----- Original Message ----- From: "Daniel Tiru" <de...@ti...> To: <dyn...@li...> Sent: Wednesday, February 04, 2004 3:50 AM Subject: Re: [Dynapi-Help] createTextRange > Iam now currently porting the functions and my online HTML-editor to dynApi (only working with IE/moz) and i wonder if anyone would be intressted if i put it into the library and maybee we make a new folder/part of the project called extras or something? I am not sure what i would call it as its not a widget or a component in other cases. > > But i think it could be fun for alot of ppl to get access to it. > > Maybee we could find some feature that would work in opera? As its still possible to add things to the end and start of the textarea. > > Some may not know what the editor is capable of, but if intressted you are welcome to ask me :) > > Best regards > Daniel > > > > > > Not as far as I'm concerned. > > > > I think it only works in IE and Moz > > > > -- > > Raymond Irving > > > > --- Daniel Tiru <de...@ti...> wrote: > > > hi folks! > > > > > > Long time no see... > > > > > > I have run into a small problem (or maybee not) but > > > i need to get something verified. > > > > > > Does the javascript method createTextRange work in > > > all browsers? > > > Or is there some other way to find out where the > > > start/end is in a textarea? > > > > > > best regards > > > Daniel > > > > > > > > > > > ------------------------------------------------------- > > > The SF.Net email is sponsored by EclipseCon 2004 > > > Premiere Conference on Open Tools Development and > > > Integration > > > See the breadth of Eclipse activity. February 3-5 in > > > Anaheim, CA. > > > http://www.eclipsecon.org/osdn > > > _______________________________________________ > > > Dynapi-Help mailing list > > > Dyn...@li... > > > > > https://lists.sourceforge.net/lists/listinfo/dynapi-help > > > > > > > > ------------------------------------------------------- > > The SF.Net email is sponsored by EclipseCon 2004 > > Premiere Conference on Open Tools Development and Integration > > See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. > > http://www.eclipsecon.org/osdn > > _______________________________________________ > > Dynapi-Help mailing list > > Dyn...@li... > > https://lists.sourceforge.net/lists/listinfo/dynapi-help > > > > > ------------------------------------------------------- > The SF.Net email is sponsored by EclipseCon 2004 > Premiere Conference on Open Tools Development and Integration > See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. > http://www.eclipsecon.org/osdn > _______________________________________________ > Dynapi-Help mailing list > Dyn...@li... > https://lists.sourceforge.net/lists/listinfo/dynapi-help > > |