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
| <div id="editor">
| <p>Foo bar</p>
| </div>
|
| <div id="tokenValue" style="word-break:break-all;border:1px solid red;"></div>
|
| <script>
| exportPdfUtils.initManualTest();
|
| var editor = CKEDITOR.replace( 'editor', exportPdfUtils.getDefaultConfig( 'manual', {
| extraPlugins: 'easyimage,exportpdf',
| cloudServices_uploadUrl: 'https://33333.cke-cs.com/easyimage/upload/',
| cloudServices_tokenUrl: 'https://33333.cke-cs.com/token/dev/ijrDsqFix838Gh3wGO3F77FSW94BwcLXprJ4APSp3XQ26xsUHTi0jcb1hoBt'
| } ) );
|
| editor.on( 'instanceReady', function() {
| if ( !CKEDITOR.config.exportPdf_tokenUrl ) {
| bender.ignore();
| }
| } );
|
| editor.on( 'exportPdf', function( evt ) {
| var value = CKEDITOR.document.findOne( '#tokenValue' );
|
| value.setHtml( evt.data.token );
| }, null, null, 17 );
| </script>
|
|