Ticket #1075: test.htm

File test.htm, 796 bytes (added by Bossaer Olivier, 17 years ago)

Test case

Line 
1<html>
2<head>
3        <title>bug with getSelection null</title>
4        <script type="text/javascript" src="fckeditor/fckeditor.js" ></script>
5</head>
6<body>
7<input type="button" value="Generate a visible editor by code (OK)" onclick="AddEditor(true);" />
8<input type="button" value="Generate a hidden editor by code (KO)" onclick="AddEditor(false);" />
9<script type="text/javascript">
10var counter = 0;
11function AddEditor(visible)
12{
13        var container = document.body.appendChild(document.createElement("div"));
14        if (!visible)
15        {
16                container.style.display = "none";
17        }
18        var textarea = container.appendChild(document.createElement("textarea"));
19        textarea.id = "editor" + counter++;
20        var fckEditor = new FCKeditor( textarea.id ) ;
21    fckEditor.ReplaceTextarea() ;
22}
23</script>
24</body>
25</html>
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy