Bonjour,
depuis quelques jours, j'essaie de placer un snipper dans une textarea en utilisant applyTo mais ça ne marche pas. pouvez vous me dire ce qui cloche ?
Mon code est comme suit :


Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Custom Spinner Widget Example</title>
 
    <!-- ** CSS ** -->
    <!-- base library -->
    <link rel="stylesheet" type="text/css" href="ext-all.css" />
 
    <!-- overrides to base library -->
    <link rel="stylesheet" type="text/css" href="ux/css/Spinner.css" />
 
    <!-- page specific -->
    <style type="text/css">
 
    /* global css */
    body {
        padding:0 2em 3em;
    	font: normal 12px arial, helvetica, sans-serif;
    	color: #282828;
    }
 
    </style>
 
 
    <!-- ** Javascript ** -->
    <!-- ExtJS library: base/adapter -->
    <script type="text/javascript" src="ext-base.js"></script>
 
    <!-- ExtJS library: all widgets -->
    <script type="text/javascript" src="ext-all.js"></script>
 
 
    <script type="text/javascript" src="ux/Spinner.js"></script>
    <script type="text/javascript" src="ux/SpinnerField.js"></script>
 
 
</head>
<body>
 
<textarea id="aaa"> asma </textarea>
 
<script type="text/javascript" >
 
Ext.onReady(function(){
    var simple = new Ext.FormPanel({
        labelWidth: 40, // label settings here cascade unless overridden
        frame: true,
        title: '',
        bodyStyle: 'padding:5px 5px 0',
        width: 210,
        defaults: {width: 135},
        defaultType: 'textfield',
 
        items: [
            new Ext.ux.form.SpinnerField({
                fieldLabel: '',
                name: 'age'
            })
 
 
        ]});
 
    simple.render('form-ct');
 
    applyTo:'aaa'
 
});
 
</script>
 
<div id="form-ct" style="margin-top:1em"></div>
 
</body>
</html>
Merci de m'aider.