/    Sign up×
Community /Pin to ProfileBookmark

Making textbox color change?

I been trying to make a richtext editor using javascript :-S… But im having a hard time figuring out how to make a certain word colored :-S…

Example is say there is a sentence.

[quote]

[color=”#0000FF”]print [/color]“Hello World”;

[/quote]

How would I make “print” blue and the rest a different color? Or is that even possible :-S?

Currently im searching google on richtext editors and looking at the sources, but I don’t seem to understand anything :-S… can anyone help :-(?

I guess what I haven’t figured out yet is making something “HTML-enabled” o_O. I think I can figure things out after I learn how to enable text inside a textarea to be “HTML enabled”.

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@MrNobodyJan 27.2009 — It can't be done if you are trying to use a TEXTAREA for your editor. Instead, you need to use a ContentEditable DIV. Now, keep in mind that, last I knew, IE and the other browsers implement such a ContentEditable DIV in different ways. Dig?
×

Success!

Help @robin105 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 5.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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

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

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...