...

View Full Version : help getting text properties...



Codin_away
05-05-2004, 10:25 PM
Can someone point me towards some documentation or sample code on how to detect the properties of text that the cursor is on? Like what Mickeysoft does when you move around with your arrow keys in a word document and the font type field is changed based on the text your on. I need to know how to detect the text properties (font type, font size, bold on, italics on, etc.) and how to modify what is selected on a select type form field (not it's contents but what's actually selected).

Any help is appreciated, thanks folks.

sad69
05-05-2004, 10:39 PM
And you want this in Javascript? So are you talking about the kinds of things this forum is capable of doing while you're posting a message?

In that case, search this forum using key words like "selected text" or something like that. Here's a thread I posted some stuff in that might be useful:
http://www.codingforums.com/showthread.php?t=37763&highlight=selected+text

Lots of users have wanted to created a BB or forum type website like this from scratch and they've posted a lot of their troubles and the like here. So there's lots of information to find.

Good luck,
Sadiq.

swmr
05-05-2004, 11:18 PM
I need to know how to detect the text properties (font type, font size, bold on, italics on, etc.) and how to modify what is selected on a select type form field (not it's contents but what's actually selected).


Internet Explorer has several features, if that's all you're coding for...

Scriptable Editing (http://msdn.microsoft.com/workshop/author/editing/editing_entry.asp)

Command Identifiers (http://msdn.microsoft.com/workshop/author/dhtml/reference/commandids.asp) | Dialog Helper Object (http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/dialoghelper.asp) | selection Object (http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/obj_selection.asp) | TextRange Object (http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/obj_textrange.asp) | TextRectangle Object (http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/textrectangle.asp)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum