tokenfetching.html 545 B

1234567891011121314151617181920212223
  1. <div id="editor">
  2. <p>Foo bar</p>
  3. </div>
  4. <div id="tokenValue" style="word-break:break-all;border:1px solid red;"></div>
  5. <script>
  6. exportPdfUtils.initManualTest();
  7. var editor = CKEDITOR.replace( 'editor', exportPdfUtils.getDefaultConfig( 'manual' ) );
  8. editor.on( 'instanceReady', function() {
  9. if ( !CKEDITOR.config.exportPdf_tokenUrl ) {
  10. bender.ignore();
  11. }
  12. } );
  13. editor.on( 'exportPdf', function( evt ) {
  14. var value = CKEDITOR.document.findOne( '#tokenValue' );
  15. value.setHtml( evt.data.token );
  16. }, null, null, 17 );
  17. </script>