0
|
1 |
editor_formats.tinymce = {
|
|
2 |
name: 'TinyMCE',
|
|
3 |
transform: false,
|
|
4 |
convert_to: function(text)
|
|
5 |
{
|
|
6 |
this.transform = true;
|
|
7 |
// by not returning a string here, we're being allowed to simply set a flag for the UI transformation
|
|
8 |
return null;
|
|
9 |
},
|
|
10 |
convert_from: function(text)
|
|
11 |
{
|
|
12 |
this.transform = true;
|
|
13 |
// by not returning a string here, we're being allowed to simply set a flag for the UI transformation
|
|
14 |
return null;
|
|
15 |
},
|
|
16 |
ui_construct: function()
|
|
17 |
{
|
|
18 |
console.debug('this.transform = ', this.transform);
|
|
19 |
$dynano('ajaxEditArea').switchToMCE(this.transform);
|
|
20 |
this.transform = false;
|
|
21 |
},
|
|
22 |
ui_destroy: function()
|
|
23 |
{
|
|
24 |
console.debug('this.transform = ', this.transform);
|
|
25 |
$dynano('ajaxEditArea').destroyMCE(this.transform);
|
|
26 |
this.transform = false;
|
|
27 |
},
|
|
28 |
get_text: function()
|
|
29 |
{
|
|
30 |
return $dynano('ajaxEditArea').getContent();
|
|
31 |
},
|
|
32 |
set_text: function(t)
|
|
33 |
{
|
|
34 |
return $dynano('ajaxEditArea').setContent(t);
|
|
35 |
},
|
|
36 |
};
|