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 Offline

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

Please create a new Ticket and we will get back to you as soon as we can.

#105986 Curly Quotes In Addition to Straight Quotes

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 das on Sunday, 27 December 2020 18:38 GMT

das
Maybe this option is already in JCE but I looked and couldn't find it. By default JCE seems to default to single and double straight quotes. Is it possible to have the option for curly quotes as well (no instead -- would like to have both types available)?

Thanks for your time.

DS

Ryan
Is it possible to have the option for curly quotes as well (no instead -- would like to have both types available)?
There is no option for this, but you can create a custom script that can apply the quotes with a certain key combination. Create a file called editor.js in /media/jce/js and add 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 in the editor, select some text, and use CTRL + SHIFT and the double quote key on your keboard to apply the curly quotes to the selected text.

Ryan Demmer

Lead Developer / CEO / CTO

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

das
Thank you!