Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
LP0 ON FIRE
Jan 25, 2006

beep boop
i've searched google for github code, stack overflow answers, and there's no wordwrap functions that i can find that work correctly. i'm using it for an indented part of an email in javascript in a textarea. i'm thinking of writing one myself, but i'm lazy and scared that i will run into all these exceptions that don't make it work

Adbot
ADBOT LOVES YOU

Bloody
Mar 3, 2013

ok

bump_fn
Apr 12, 2004

two of them

hifi
Jul 25, 2012

LP0 ON FIRE posted:

i've searched google for github code, stack overflow answers, and there's no wordwrap functions that i can find that work correctly. i'm using it for an indented part of an email in javascript in a textarea. i'm thinking of writing one myself, but i'm lazy and scared that i will run into all these exceptions that don't make it work

http://joeclark.org/ffaq.html

LP0 ON FIRE
Jan 25, 2006

beep boop

good knowledge i guess if i end up making a function

the worst implementations i've seen have separate functions for setCharAt and one that does the same thing, but it's a prototype

MrMoo
Sep 14, 2000

TeX apparently: http://docs.translatehouse.org/projects/localization-guide/en/latest/guide/hyphenation.html

The Management
Jan 2, 2010

sup, bitch?
word wrap requires understanding right-to-left languages interspersed with left-to-right. it is computationally impossible .

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

The Management posted:

word wrap requires understanding right-to-left languages interspersed with left-to-right. it is computationally impossible .

generally speaking most text-processing stuff doesn't attempt to be locale agnostic.

also i will use this thread to say that it is annoying that css cannot both wrap text and truncate it with an ellipsis at the same time. you get one or the other, gently caress you if you have a fixed-height box you want to fill.

Hed
Mar 31, 2004

Fun Shoe

cis autodrag posted:

have a fixed-height box you want to fill.

txt me ;)

George
Nov 27, 2004

No love for your made-up things.

Hed posted:

TeX me ;)

Bloody
Mar 3, 2013

Hed posted:

txt
me
;)

LP0 ON FIRE
Jan 25, 2006

beep boop

this ain't no javascript


cis autodrag posted:

gently caress you if you have a fixed-height box you want to fill.

:swoon:

Powerful Two-Hander
Mar 10, 2004

Mods please change my name to "Tooter Skeleton" TIA.


just insert a carriage return every 4th word or whatever


bug closed: good enough

big scary monsters
Sep 2, 2011

-~Skullwave~-
goon project?

pram
Jun 10, 2001
stop posting op

LP0 ON FIRE
Jan 25, 2006

beep boop

i'll start the wiki

MrMoo
Sep 14, 2000

LP0 ON FIRE posted:

this ain't no javascript


:swoon:

You think there isn't TeX for JavaScript already?

http://manuels.github.io/texlive.js/

:lol:

LP0 ON FIRE
Jan 25, 2006

beep boop

MrMoo posted:

You think there isn't TeX for JavaScript already?

http://manuels.github.io/texlive.js/

:lol:

nice

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

drat, I thought format="flowed" was older than 2000ish

Adbot
ADBOT LOVES YOU

angry_keebler
Jul 16, 2006

In His presence the mountains quake and the hills melt away; the earth trembles and its people are destroyed. Who can stand before His fierce anger?
maybe you could just shave the words you want on your chest so you would be "wordwrapping" on your own human body

idk just spitballing here

  • Locked thread