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 is currently Online

Official support hours
Monday to Friday
09:00 - 17:00 Europe/London (BST)

#106268 German quotation marks?

Posted in ‘Editor’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by SigridGR on Monday, 26 June 2023 10:46 BST

rian
Hello,
how can I make the editor use the correct german quotation marks when typing text?
if I type shift+2 to make quotes, it looks like this: "quote", but correct would be „quote“.
I don't want to have to use symbols for that. Is there another way?

Ryan
Create a file called editor.js in /media/jce/js/ containing the following:

(function() {
	tinyMCE.onAddEditor.add(function (mgr, ed) {
		ed.onKeyUp.add(function(ed, e) {
			if (e.keyCode == 222 && e.shiftKey && e.ctrlKey) {
				ed.execCommand('mceReplaceContent', false, '„{$selection}”');
			}
		});
	});
})();
Then type in your text, select it, and use CTRL + SHIFT + " to create the quotes around the selection.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

Ryan
Or to use CTRL + SHIFT + 2

(function() {
	tinyMCE.onAddEditor.add(function (mgr, ed) {
		ed.onKeyUp.add(function(ed, e) {
			if (e.keyCode == 50 && e.shiftKey && e.ctrlKey) {
				ed.execCommand('mceReplaceContent', false, '„{$selection}“');
			}
		});
	});
})();

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

rian
thanks. I tried it, but it does not work

Ryan
Delete the file I instructed you to create, and install JCE Pro 2.9.2 RC 9 - https://www.joomlacontenteditor.net/downloads/editor/pro/development

If you then have the site / admin language set to German, and you have the JCE German Language Pack installed - https://www.joomlacontenteditor.net/downloads/languages/editor/de-de - then CTRL + SHIFT + 2 will create the quotes on a selection of text, eg: „quote“

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

rian
Perfect, thank you very much!!

SigridGR
This just solved my problem! thanks!
Could you also add that for single quotation marks?
'test' to ‚test‘
Right now, I get the same „" for the single ones.

That would be just great!
(or should a create a new topic?)

Ryan
@SigridGR# - Please try JCE Pro 2.9.38 RC - https://www.joomlacontenteditor.net/downloads/editor/pro/development

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

SigridGR
Yes, this works also for single quotation marks now!
Thank you!