bootstrap-ui-inner.html 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
  2. <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js" integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4" crossorigin="anonymous"></script>
  3. <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js" integrity="sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1" crossorigin="anonymous"></script>
  4. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous">
  5. <!-- The outermost cotainer of the editor. -->
  6. <div class="ck-editor">
  7. <!-- The toolbar of the editor. -->
  8. <div class="btn-toolbar" role="toolbar" aria-label="Editor toolbar">
  9. <!-- The headings dropdown. -->
  10. <div class="btn-group mr-2" role="group" aria-label="Headings">
  11. <div class="dropdown" id="heading">
  12. <button class="btn btn-primary btn-sm dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span>Headings</span></button>
  13. <div class="dropdown-menu" aria-labelledby="heading-button"></div>
  14. </div>
  15. </div>
  16. <!-- Basic styles buttons. -->
  17. <div class="btn-group mr-2" role="group" aria-label="Basic styles">
  18. <button type="button" class="btn btn-primary btn-sm" id="bold">B</button>
  19. <button type="button" class="btn btn-primary btn-sm" id="italic">I</button>
  20. <button type="button" class="btn btn-primary btn-sm" id="underline">U</button>
  21. </div>
  22. <!-- Undo and redo buttons. -->
  23. <div class="btn-group mr-2" role="group" aria-label="Undo">
  24. <button type="button" class="btn btn-primary btn-sm" id="undo">&larr;</button>
  25. <button type="button" class="btn btn-primary btn-sm" id="redo">&rarr;</button>
  26. </div>
  27. </div>
  28. <!-- The container containing data of the editor. -->
  29. <div id="editor">
  30. <h2>Custom UI</h2>
  31. <p>
  32. This editor uses <b>Bootstrap</b> components to build the user interface.
  33. </p>
  34. </div>
  35. </div>
  36. <button type="button" id="toggle-readonly">Toggle editor read–only</button>
  37. <style>
  38. /* Let's give the editor some space and limits using a border. */
  39. .ck-editor {
  40. margin: 1em 0;
  41. border: 1px solid rgba( 0, 0, 0, .1 );
  42. border-radius: 4px;
  43. }
  44. /* Adding internal spacing, border and background to the toolbar. */
  45. .ck-editor .btn-toolbar {
  46. padding: .5rem;
  47. background: #f7f7f9;
  48. border-bottom: 1px solid rgba( 0, 0, 0, .1 );
  49. }
  50. /* Tweaking the editable area for better readability. */
  51. .ck-editor .ck-editor__editable {
  52. padding: 2em 2em 1em;
  53. overflow: auto;
  54. }
  55. /* When in read–only mode, the editable should fade out. */
  56. .ck-editor .ck-editor__editable:not([contenteditable]) {
  57. background: #fafafa;
  58. color: #777;
  59. }
  60. /* Make sure the headings dropdown button does not change its size
  61. as different headings are selected */
  62. .ck-editor .dropdown-toggle span {
  63. display: inline-block;
  64. width: 100px;
  65. text-align: left;
  66. overflow: hidden;
  67. text-overflow: ellipsis;
  68. vertical-align: bottom;
  69. }
  70. /* Make the headings dropdown items visually distinctive. */
  71. .ck-editor .heading-item_heading1 { font-size: 1.5em; }
  72. .ck-editor .heading-item_heading2 { font-size: 1.3em; }
  73. .ck-editor .heading-item_heading3 { font-size: 1.1em; }
  74. .ck-editor [class*="heading-item_"] {
  75. line-height: 22px;
  76. padding: 10px;
  77. }
  78. .ck-editor [class*="heading-item_heading"] {
  79. font-weight: bold;
  80. }
  81. /* Give the basic styles buttons some icon–like shape */
  82. .ck-editor #bold { font-weight: bold; }
  83. .ck-editor #italic { font-style: italic; }
  84. .ck-editor #underline { text-decoration: underline; }
  85. </style>