options.php 829 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. /*
  3. * @var $options array contains all the options the current block we're ediging contains
  4. * @var $controls NewsletterControls
  5. */
  6. $default_options = array(
  7. 'block_background'=>'#ffffff',
  8. );
  9. $options = array_merge($default_options, $options);
  10. ?>
  11. <style>
  12. .CodeMirror {
  13. height: 400px;
  14. }
  15. </style>
  16. <script>
  17. var templateEditor;
  18. jQuery(function () {
  19. templateEditor = CodeMirror.fromTextArea(document.getElementById("options-html"), {
  20. lineNumbers: true,
  21. mode: 'htmlmixed',
  22. lineWrapping: true,
  23. extraKeys: {"Ctrl-Space": "autocomplete"}
  24. });
  25. });
  26. </script>
  27. <table class="form-table">
  28. <tr>
  29. <td>
  30. <?php $controls->textarea('html') ?>
  31. </td>
  32. </tr>
  33. </table>
  34. <?php $fields->block_commons() ?>