configfilename.html 667 B

123456789101112131415161718192021222324252627
  1. <div id="editor1">
  2. <p>My filename should be 'ckeditor4-export-pdf.pdf'.</p>
  3. </div>
  4. <div id="editor2">
  5. <p>And mine - 'different-name.pdf'.</p>
  6. </div>
  7. <div id="editor3">
  8. <h1>Beautiful title</h1>
  9. </div>
  10. <script>
  11. exportPdfUtils.initManualTest();
  12. CKEDITOR.replace( 'editor1', exportPdfUtils.getDefaultConfig( 'manual' ) );
  13. CKEDITOR.replace( 'editor2', exportPdfUtils.getDefaultConfig( 'manual', {
  14. exportPdf_fileName: 'different-name.pdf',
  15. } ) );
  16. var editor3 = CKEDITOR.replace( 'editor3', exportPdfUtils.getDefaultConfig( 'manual', {
  17. exportPdf_fileName: function() {
  18. return editor3.editable().findOne( 'h1' ).getText() + '.pdf';
  19. }
  20. } ) );
  21. </script>