/    Sign up×
Community /Pin to ProfileBookmark

insert tags into textarea around any selection

i have some problem please help if you can

i have one textarea, and user can type his info into this area
i make some buttons, that user can format his text
(like in this forum)

but here it is made so, that you need to write text into open.window

i want that tags will be insert by clicking button around any selection, and then shown in the same textarea already formated

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@ivan52authorApr 30.2003 — http://www.daveclarkconsulting.com/research/selected_text.html

it is quite good

i need something like this

but it works on DHTML Edit exec commands

how can i format text like in this wisiwyg editor with any special tag

for example i need insert p align=justify around selection

or tag big, or something else anything what i need

not only given in dhtml classes
Copy linkTweet thisAlerts:
@ivan52authorApr 30.2003 — what i have find

JustifyCenter

Centers the format block in which the current selection is located.

JustifyFull

Not currently supported.

JustifyLeft

Left-justifies the format block in which the current selection is located.

JustifyNone

Not currently supported.

JustifyRight

Right-justifies the format block in which the current selection is located.

justify full is not supportet jet, but i need this option to format my text maybe can i something else????
×

Success!

Help @ivan52 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.24,
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,
)...