6056 |
efrain |
1 |
<div id="editor">
|
|
|
2 |
<p>Foo bar</p>
|
|
|
3 |
</div>
|
|
|
4 |
|
|
|
5 |
<div id="tokenValue" style="word-break:break-all;border:1px solid red;"></div>
|
|
|
6 |
|
|
|
7 |
<script>
|
|
|
8 |
exportPdfUtils.initManualTest();
|
|
|
9 |
|
|
|
10 |
var editor = CKEDITOR.replace( 'editor', exportPdfUtils.getDefaultConfig( 'manual', {
|
|
|
11 |
extraPlugins: 'easyimage,exportpdf',
|
|
|
12 |
cloudServices_uploadUrl: 'https://33333.cke-cs.com/easyimage/upload/',
|
|
|
13 |
cloudServices_tokenUrl: 'https://33333.cke-cs.com/token/dev/ijrDsqFix838Gh3wGO3F77FSW94BwcLXprJ4APSp3XQ26xsUHTi0jcb1hoBt'
|
|
|
14 |
} ) );
|
|
|
15 |
|
|
|
16 |
editor.on( 'instanceReady', function() {
|
|
|
17 |
if ( !CKEDITOR.config.exportPdf_tokenUrl ) {
|
|
|
18 |
bender.ignore();
|
|
|
19 |
}
|
|
|
20 |
} );
|
|
|
21 |
|
|
|
22 |
editor.on( 'exportPdf', function( evt ) {
|
|
|
23 |
var value = CKEDITOR.document.findOne( '#tokenValue' );
|
|
|
24 |
|
|
|
25 |
value.setHtml( evt.data.token );
|
|
|
26 |
}, null, null, 17 );
|
|
|
27 |
</script>
|