Replace quotation marks

2 posts, 0 answers
  1. AR
    AR avatar
    5 posts
    Member since:
    Jun 2006

    Posted 13 Aug 2013 Link to this post

    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

  2. Ianko
    Admin
    Ianko avatar
    1940 posts

    Posted 15 Aug 2013 Link to this post

    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.
Back to Top