Ticket #9405: test2_cke3.html

File test2_cke3.html, 2.0 KB (added by Jakub Ś, 11 years ago)
Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<!--
3Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
4For licensing, see LICENSE.html or http://ckeditor.com/license
5-->
6<html xmlns="http://www.w3.org/1999/xhtml">
7<head>
8        <title>Replace Textarea by Code &mdash; CKEditor Sample</title>
9        <meta content="text/html; charset=utf-8" http-equiv="content-type" />
10        <script type="text/javascript" src="http://ckeditor.com/apps/ckeditor/3.6.5/ckeditor.js"></script>
11</head>
12<body> 
13        <textarea rows="8" id="my-editor" cols="80">
14                <p class="Kuvateksti element-has-class">Test</p>
15                <table class="Testitaulukko element-has-class">
16                        <tbody><tr><td>I'm a table</td></tr></tbody>
17                </table>
18                <ul class="Testilista-ul element-has-class"><li><ul><li><ul><li>I'm very nested.</li></ul></li></ul></li></ul>
19               
20                <table class="element-has-class">
21                        <tbody><tr><td>I'm a table</td></tr></tbody>
22                </table>               
23        </textarea>
24        <script>
25                        window.x  = CKEDITOR.editor.replace('my-editor', {
26                                                skin : 'office2003',
27                                                stylesSet: [
28                                                        // Block example
29                                                        { name: 'Kuvateksti', element: 'p', attributes: { 'class': 'Kuvateksti element-has-class'} },
30                                                        // Inline example
31                                                        { name: 'Huomiovari', element: 'span', attributes: { 'class':'Huomiovari element-has-class' } }
32                                                        // From DB
33                                                        ,{ name : 'Testitaulukko2', element : 'table', attributes : { 'class':'element-has-class'} }
34                                                        ,{ name : 'Testitaulukko', element : 'table', attributes : { 'class':'Testitaulukko element-has-class'} }
35                                                        ,{ name : 'Testilista-ul', element : 'ul', attributes : { 'class':'Testilista-ul element-has-class'} }
36                                                        ,{ name : 'Testilista-ol', element : 'ol', attributes : { 'class':'Testilista-ol element-has-class'} }
37                                                ]
38                });
39                window.x.addCss( '.element-has-class{ background-color: #eee; border: 3px solid purple; color:red; }' ); 
40</script>
41</body>
42</html>
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy