Ticket #7379: Language Direction.htm

File Language Direction.htm, 1.2 KB (added by Rajasimhan, 13 years ago)

Sample file to replicate the Language Direction Issue

Line 
1
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4        <title>Replace Textarea by Code &mdash; CKEditor Sample</title>
5        <meta content="text/html; charset=utf-8" http-equiv="content-type" />
6        <script type="text/javascript" src="../ckeditor.js"></script>
7        <script src="sample.js" type="text/javascript"></script>
8        <link href="sample.css" rel="stylesheet" type="text/css" />
9
10<script type="text/javascript">
11                                var editor;
12                                function createEditor( languageCode )
13                                {
14                                        if ( editor )
15                                        {       
16                                                editor.destroy();
17                                        }
18                                       
19                                                editor = CKEDITOR.replace( 'editor1');
20
21                                                if ( languageCode == "en" )
22                                                {
23                                                        CKEDITOR.config.language= 'en';
24                                                        CKEDITOR.config.contentsLangDirection='ltr';
25                                                }
26                                                else
27                                                {
28                                                        CKEDITOR.config.language= 'ar';
29                                                        CKEDITOR.config.contentsLangDirection='rtl';
30                                                }
31                                                                                       
32                                }
33                               
34</script>
35</head>
36
37
38
39<body>
40
41
42<br>
43<input type="radio" name="group1" value="English"  onclick="createEditor('en');"> English <br>
44<input type="radio" name="group1" value="Arabic"  onclick="createEditor('ar');"> Arabic <br>
45                                           
46
47
48                <p><textarea cols="80" id="editor1" name="editor1" rows="10">Multilanguage</textarea>
49       
50</body>
51</html>
52
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy