This is a migrated thread and some comments may be shown as answers.

Replace quotation marks

1 Answer 48 Views
Editor
This is a migrated thread and some comments may be shown as answers.
AR
Top achievements
Rank 1
AR asked on 13 Aug 2013, 09:31 AM
Hello,

I was wondering if it is possible to handle quotation marks in the Editor so that they work according to standards in different countries. 

In Switzerland and Germany the quotation marks should be like this: „ …“ but in Sweden and UK it should be like this: "...".

Is there any way of handling this without adding a keydown listener that does this manually?

Best regards

1 Answer, 1 is accepted

Sort by
0
Ianko
Telerik team
answered on 15 Aug 2013, 02:37 PM
Hello Auðunn,

Currently the content area is an editable iframe and the content is represented as a string value, so it could be searched within this string value and parts of it to be replaced via custom logic. Additionally there is no known approach to get the client's culture.

Nevertheless, I could suggest the following:

  • If you need only the German quotation you could implement a custom content filter that replaces the original quotation marks with the desired HTML entities ( = „   = “) in the editor's content. The additional problem with this approach would be the detection of the client's language and the implementation logic for detecting the opening and closing quotation mark.
  • Another approach that I would recommend to you is using custom tools with keyboard shortcuts, so that the users could choose to insert the quotations or not. For this approach it would be best to use two buttons, one for inserting the opening quotation and the other for the closing. This way the users will be able to use different keyboard shortcuts for fast and easy typing. For more information about custom tools and toolbars you could follow this help article.

Regards,
Ianko
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Editor
Asked by
AR
Top achievements
Rank 1
Answers by
Ianko
Telerik team
Share this question
or