Ticket #13683: test2.html

File test2.html, 843 bytes (added by Jakub Ś, 9 years ago)
Line 
1<!DOCTYPE html>
2<html>
3    <head>
4        <meta charset="utf-8">
5        <title>A Simple Page with CKEditor</title>
6        <script src="../ckeditor.js"></script>
7    </head>
8    <body>
9                <button id="myFirstButton" onclick="insertImage();" >Click Me</button>
10                <button id="mySecondButton" onclick="alertData();">And Then Click Me</button>
11        <form>
12            <textarea name="editor1" id="editor1" rows="10" cols="80"></textarea>
13            <script>
14                var editor = CKEDITOR.replace( 'editor1', {extraPlugins:'divarea'} );
15                               
16                                function insertImage(){
17                                        editor.insertHtml('<img src="http://c.cksource.com/a/5/img/sprites.png" />' );
18                                }
19                               
20                                function alertData(){
21                                        alert( editor.getData() );
22                                }
23            </script>
24            <button type="submit">Submit</button>
25        </form>
26    </body>
27</html>
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy