/    Sign up×
Community /Pin to ProfileBookmark

is it possible to style a textbox?

this is actually for the XUL element textbox, but if you know nothing about that imagine it as a textarea element.

The textarea displays the innerHTML of the body. I want to make syntax highlighting. I already can take the whole text and make it a different color. But how would i be able to change the color of individual things. It doesnt look like i can use html in the textbox because it displays all text.

What i dont want it to come to, is to have to not use a textbox, display the innerHTML as content, and make it editable and then put styles to that. this would suck, i hope i can do it with the textbox

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@KorMay 03.2008 — You can't, as far as I know...
×

Success!

Help @optikalefx spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...