Insert non-breakable spaces into text (vlna)

This forum is for general questions about extensions for Joomla! 3.x.

Moderators: pe7er, General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Post Reply
tychapogoy
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 113
Joined: Thu Oct 01, 2015 7:52 pm

Insert non-breakable spaces into text (vlna)

Post by tychapogoy » Mon Sep 10, 2018 12:45 pm

Dear users,

is there any plugin for inserting non-breakable spaces into (the currently) edited text, please? Such as vlna program on Unix https://www.systutorials.com/docs/linux/man/1-vlna/ or tilde/vlna for LaTeX.

User avatar
effrit
Joomla! Guru
Joomla! Guru
Posts: 846
Joined: Sun Nov 12, 2017 2:21 pm
Location: middle of Russia
Contact:

Re: Insert non-breakable spaces into text (vlna)

Post by effrit » Mon Sep 10, 2018 4:15 pm

hi.
you must be more specific. there is button in wisiwig editors for inserting such symbol.
so paste paragraph of text and write what you want in result.

tychapogoy
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 113
Joined: Thu Oct 01, 2015 7:52 pm

Re: Insert non-breakable spaces into text (vlna)

Post by tychapogoy » Thu Sep 13, 2018 9:48 pm

The result of pressing 1 single button in a wysiwyg editor for a text shall be the following:

Code: Select all

The result of pressing 1~single button in a~wysiwyg editor for a~text shall be the following:
where symbol ~ [tilde] means a non-breakable space (3 times in the text above).

User avatar
effrit
Joomla! Guru
Joomla! Guru
Posts: 846
Joined: Sun Nov 12, 2017 2:21 pm
Location: middle of Russia
Contact:

Re: Insert non-breakable spaces into text (vlna)

Post by effrit » Fri Sep 14, 2018 4:52 am

if it's only about not letting single characters without leading non-space it's easy task for small plugin.
i will try make one in couple of days if nobody present another solution.

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 24885
Joined: Mon Oct 27, 2008 9:27 pm
Location: Akershus, Norway

Re: Insert non-breakable spaces into text (vlna)

Post by Per Yngve Berg » Fri Sep 14, 2018 9:32 am

Non-breakable space is character 160. It can be coded as &#160; or &nbsp;

https://www.w3schools.com/html/html_charset.asp

User avatar
effrit
Joomla! Guru
Joomla! Guru
Posts: 846
Joined: Sun Nov 12, 2017 2:21 pm
Location: middle of Russia
Contact:

Re: Insert non-breakable spaces into text (vlna)

Post by effrit » Fri Sep 14, 2018 11:56 am

test this one
https://yadi.sk/d/F_96zUcVInyjKw
dont mess with options (they do nothing, i just make it from other plugin) just enable plugin.
press [NBS] editor button and text will replaced.
the text visually will be the same but if you copy text in World and highlight special symbols you will see difference.

tychapogoy
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 113
Joined: Thu Oct 01, 2015 7:52 pm

Re: Insert non-breakable spaces into text (vlna)

Post by tychapogoy » Thu Sep 20, 2018 6:08 pm

Dear effrit,

I'm sorry for the delay in my response. Thank you for the effort with the plugin and reminding me to test it. I downloaded it in time before expiration, but tested only now. The plugin works almost as expected.

It is putting &nbsp; between a single letter and a following word.
It is not putting a &nbsp; between a single letter and a word if these follows a single letter

Input

Code: Select all

a k šifrovanému
output

Code: Select all

a&nbsp;k šifrovanému
expected output

Code: Select all

a&nbsp;k&nbsp;šifrovanému
Is this something that can be handled programmatically, please?

User avatar
effrit
Joomla! Guru
Joomla! Guru
Posts: 846
Joined: Sun Nov 12, 2017 2:21 pm
Location: middle of Russia
Contact:

Re: Insert non-breakable spaces into text (vlna)

Post by effrit » Thu Sep 20, 2018 7:53 pm

this is just amazing.
i spend my time, make solution, even send you notification, and u silently take it without single word and now, after several day u return and ask for fixing?
i am even don't remember what i did because week was pass. worst feedback for free work.

tychapogoy
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 113
Joined: Thu Oct 01, 2015 7:52 pm

Re: Insert non-breakable spaces into text (vlna)

Post by tychapogoy » Thu Sep 20, 2018 10:28 pm

I don't understand why there is a wigging. I was urged to react by a PM. So, I followed the instructions, thanked for the effort and gave a feedback. Is it a delay in my response(s), which is a decisive factor, please? How could I take it loudly?

For the time being I solved it by changing the regex to

Code: Select all

const regex = /((&nbsp;|\s)[A-Za-z0-9])\s(?![\s])/gm;
and running it twice.

Thank you, effrit, for the support. That helped me a lot.

User avatar
effrit
Joomla! Guru
Joomla! Guru
Posts: 846
Joined: Sun Nov 12, 2017 2:21 pm
Location: middle of Russia
Contact:

Re: Insert non-breakable spaces into text (vlna)

Post by effrit » Fri Sep 21, 2018 2:47 am

Man, this is single plugin for single person!
This is so specific, so nobody else will ask about, and i will not put in on JED because of it.
And this only person don't even bother to write "thank you, i will test it later."
You just absolutely ruined my motivation for helping and asking about what's wrong with it? ALL WRONG.

tychapogoy
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 113
Joined: Thu Oct 01, 2015 7:52 pm

Re: Insert non-breakable spaces into text (vlna)

Post by tychapogoy » Fri Sep 21, 2018 4:20 am

Flames detected and I will have to ignore them in the next message, please.

I'm sorry for your disappointment, dear effrit. I see that I could be more polite. But in the same personal situation I have been over the last days and seeing your request for urgency to download (due to expiration date, link is still valid), I would not and most probably could not act differently. I apologised for the delay, thanked for the support and gave feedback which has been awaited as well.

User avatar
effrit
Joomla! Guru
Joomla! Guru
Posts: 846
Joined: Sun Nov 12, 2017 2:21 pm
Location: middle of Russia
Contact:

Re: Insert non-breakable spaces into text (vlna)

Post by effrit » Fri Sep 21, 2018 4:58 am

Omg. So u tell u cant spend about 10-20 SECONDS to post answer even if u already was on forum?
And u definitely NOT been in same situation where you do something for person and take silence in return.
Try make something to peoples who ask for help and ignore you after you take the action and then u will understand how i feel and why i am angry now.


Post Reply

Return to “Extensions for Joomla! 3.x”