Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.

Turn on smart/curly quotes?

Avatar

Level 2

Our team is currently on 6.3 and we're looking for a way to turn on "smart" or "curly" quotes for text either in the rich text editor or in a basic text input field.

Is there a setting to turn or plug-in that can be used to help us with this? We don't want to have to do a global find and replace because we may need the straight quotes in some instances.

7 Replies

Avatar

Level 10

I am not aware of any setting that will let you change your quotes from standard quotes to smart quotes. You may have to do a global find and replace.

Avatar

Level 2

Thanks for the reply. That's unfortunate. Is there any settings that at least will convert them as you type?

Avatar

Employee

Can't we enable the source editor in RTE and use the codes for the curly quotes like in (1) to complete the task ?

(1) : Curling Quotes in HTML, XML, and SGML

Avatar

Level 2

That's definitely possible but not ideal. It would be very tedious and can't expect authors to know how (or care) to use the codes.

I did find this Gist for TinyMCE that might work:

https://gist.github.com/makenosound/b953ec5bb28e0d4c45d6

And also a few links on the topic at this forum:

https://processwire.com/talk/topic/5400-tinymce-converting-html-entities-to-characters/

Other platforms use Smartypants or Typogrify, so surprised Adobe wouldn't have a solution since they're a "creative" company.

Avatar

Employee

Another approach I think could work is make a custom RTE plugin which embeds html code for authors ease and they can press that plugin whenever they are authoring and want curly quotes

Sent from my iPhone

Avatar

Level 2

That could certainly work but only if they click that button.

To take it a step farther, could the plugin automatically convert quotes as you type? Using regex, convert any quote/apostrophe that's next to a letter to curly, but if it's next to a number then leave it as straight.

With a little more searching, I did find a section in the Tinymce documentation about entity encoding which may be a possible solution:

https://www.tiny.cloud/docs/configure/content-filtering/#encoding

https://www.tiny.cloud/docs/configure/content-filtering/#entities https://www.tiny.cloud/docs/configure/content-filtering/#entity_encoding

https://www.tiny.cloud/docs/configure/content-filtering/#entity_encoding

Avatar

Level 7

Hi,

You can add the curly quote symbols/characters in your RTE by adding them under "misctools" of your RTE. Add the nodes under misctools as shown below:

<misctools

   jcr:primaryType="nt:unstructured"

   features="*">

   <specialCharsConfig jcr:primaryType="nt:unstructured">

      <chars jcr:primaryType="nt:unstructured">

         <left

            jcr:primaryType="nt:unstructured"

            entity="&amp;#8220;"/>

         <right

            jcr:primaryType="nt:unstructured"

            entity="&amp;#8221;"/>

      </chars>

   </specialCharsConfig>

</misctools>

You will be able to see the curly quotes under the misctool option now in the RTE and you can add it to your content as needed.

1539857_pastedImage_0.png

You can go through this guide for better understanding Configuring the Rich Text Editor .

Hope this helps!
Regards,
Techaspect Solutions