You need to be logged in to post in the forum - Log In
An active JCE Pro Subscription is required to post in the forum - Buy a Subscription
- Support
- Forum
- Suggestons/Feature Requests
- Non-breaking space before colon in Fr-fr
Support is currently Online
Official support hours:
Monday To Friday
From 09:00 To 17:00 Europe/London (BST)
From 09:00 To 17:00 Europe/London (BST)
Hi JCE Team,
In french, there's a non-breaking space before a colon, something like "Example : my texte"
I would like to know if ther's anyway to change that space automatically so the space is non-breaking (modify a " " to a " " ) only for colon (":" ).
That would be so nice! Maybe have I miss a param somewhere ?
In french, there's a non-breaking space before a colon, something like "Example : my texte"
I would like to know if ther's anyway to change that space automatically so the space is non-breaking (modify a " " to a " " ) only for colon (":" ).
That would be so nice! Maybe have I miss a param somewhere ?
You could use a custom script to convert the space to a non-breaking space for you. Create an editor.js file in media/jce/js/ and add the following:
(function() {
tinyMCE.onAddEditor.add(function (mgr, ed) {
ed.onSetContent.add(function(ed, o) {
o.content = o.content.replace(/\s:/g, ' :');
});
ed.onGetContent.add(function(ed, o) {
o.content = o.content.replace(/\s:/g, ' :');
});
});
})();
Just because you're not paranoid doesn't mean everybody isn't out to get you.
Bonjour,
Je vais me permettre de répondre en français, mais traduire aussi en anglais.
Mon astuce, pour les espaces insécables (par exemple avant ou après les signes de ponctuation, mais aussi dans de nombreuses autres situations) consiste à utiliser un correcteur de langue française capable de mettre des espaces insécables partout où cela est réquis en fonction des règles typographiques de la langue française. Ensuite, je fais un copier-coller depuis mon éditeur de texte (Word, TextEdit…) dans l'éditeur JCE. Et là, je conserve tous mes espaces insécables (automatiquement remplacés par le code html correspondant).
On peut aussi utiliser la fonction de rechercher-remplacer de JCE, en mode code.
+++
Hello,
I will take the liberty of answering in French, but will also translate into English.
My trick, for unbreakable spaces (for example before or after punctuation marks, but also in many other situations) is to use a French language proofreader capable of putting unbreakable spaces wherever required according to the typographical rules of the French language. Then, I make a copy-paste from my text editor (Word, TextEdit...) in the JCE editor. And there, I keep all my unbreakable spaces (automatically replaced by the corresponding html code).
You can also use the search-replace function of JCE, in code mode.
Je vais me permettre de répondre en français, mais traduire aussi en anglais.
Mon astuce, pour les espaces insécables (par exemple avant ou après les signes de ponctuation, mais aussi dans de nombreuses autres situations) consiste à utiliser un correcteur de langue française capable de mettre des espaces insécables partout où cela est réquis en fonction des règles typographiques de la langue française. Ensuite, je fais un copier-coller depuis mon éditeur de texte (Word, TextEdit…) dans l'éditeur JCE. Et là, je conserve tous mes espaces insécables (automatiquement remplacés par le code html correspondant).
On peut aussi utiliser la fonction de rechercher-remplacer de JCE, en mode code.
+++
Hello,
I will take the liberty of answering in French, but will also translate into English.
My trick, for unbreakable spaces (for example before or after punctuation marks, but also in many other situations) is to use a French language proofreader capable of putting unbreakable spaces wherever required according to the typographical rules of the French language. Then, I make a copy-paste from my text editor (Word, TextEdit...) in the JCE editor. And there, I keep all my unbreakable spaces (automatically replaced by the corresponding html code).
You can also use the search-replace function of JCE, in code mode.
Yes, the forum converted the non-breaking space to an actual space when it displayed the post.
See this - https://gist.github.com/ryandemmer/18714ea584a7f63b527503038823fa30
See this - https://gist.github.com/ryandemmer/18714ea584a7f63b527503038823fa30
Just because you're not paranoid doesn't mean everybody isn't out to get you.
You could use a custom script to convert the space to a non-breaking space for you. Create an editor.js file in media/jce/js/ and add the following:
(function() {
tinyMCE.onAddEditor.add(function (mgr, ed) {
ed.onSetContent.add(function(ed, o) {
o.content = o.content.replace(/\s:/g, ' :');
});
ed.onGetContent.add(function(ed, o) {
o.content = o.content.replace(/\s:/g, ' :');
});
});
})();
Just because you're not paranoid doesn't mean everybody isn't out to get you.
Hi Ryan, thank you very much for your answer.
Actually I was wondering if there was a way to check automatically if the space before colon is non-breaking, and change from simple space to non-breaking if needed.
As I'm working on websites where I adda lot of content each days, sent to me in Word file. I just wanted to avoid this repetitive and really demanding task.
Actually I was wondering if there was a way to check automatically if the space before colon is non-breaking, and change from simple space to non-breaking if needed.
As I'm working on websites where I adda lot of content each days, sent to me in Word file. I just wanted to avoid this repetitive and really demanding task.
Use the Non-breaking space button to add the space before the colon, instead of using the space bar.
The space bar will only create a non-breaking space for every consecutive space after the first.
The space bar will only create a non-breaking space for every consecutive space after the first.
Just because you're not paranoid doesn't mean everybody isn't out to get you.
- Page :
- 1
There are no replies made for this post yet.
Be one of the first to reply to this post!
Be one of the first to reply to this post!