How to add hard white space and non-breaking hyphen for phone number?

How do I fix a phone number from hyphenating (how to make a non-breaking hyphen?) or a non-breaking space, so the phone number doesn’t wrap to the next line?

$w( “#text1” ).html = $w( “#text1” ).html.split( “-” ).join( “‑” );

that’s a terrible answer. How do you type a non-breaking hyphen?

Copy and paste the following hyphen:

Thanks. That’s a little better.
So I need to come back to this thread, copy and paste this hyphen every time? Outside of actual coding, is there a shortcut or hotkey sequence to get a non-breaking hyphen, “select symbol” menu or other user friendly solution for common symbols and special characters?

  1. You can use a regular hyphen and replace it by code (as I demonstrated in the first ‘terrible’ answer).

  2. You can copy the non-breaking hyphen from my second answer and save it wherever you wish and copy-paste it whenever you wish.

  3. You can open Microsoft Word and press the CTRL SHIFT PLUS and MINUS keys together and copy from there.

  4. You can Google it and find other ways. It’s not a Velo thing but a generic question and you can find endless references.

Wouldn’t that be nice if #3 worked in WIX? Same for non-breaking spaces, quotation marks…

I don’t think so (or at least it should have a very low priority). There’re so many Unicode characters, and unlike MS Word, Wix is not a word processor. It’s quite easy to find and copy any character you need by running a simple Google search.
example

I understand your point yet users still need to control where a hyphen or space hits. You don’t need to add every character but the most common ones are necessary.
Maybe a “insert character” table?
Example :
My product is called I-sticker, it’s hi-tech, low-power, cutting-edge, and many other hyphenated descriptives.
ok, that’s extreme but there are so many Instances where you’ve got to control where the line breaks and I’m not alone.
In my opinion this is a priority.

1 Like

You can add it to the Wishlist:
https://www.wix.com/velo/wishlist

@jonatandor35 Done :ok_hand:t3:

works well for the non breaking hyphen. How do I get the non breaking space? Tks.

1 Like