autogrow.mdx 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. ---
  2. title: Autogrow Example
  3. ---
  4. <div id="scrolling-container" style={{
  5. height: '100%',
  6. minHeight: '100%',
  7. overflowY: 'auto'
  8. }}>
  9. <Editor
  10. rootStyle={{ 'font-size': '18px', 'overflow-y': 'visible' }}
  11. style={{height: 'auto', minHeight: '100%', padding: 50}}
  12. config={{
  13. modules: {
  14. toolbar: [
  15. [{ header: [1, 2, false] }],
  16. ['bold', 'italic', 'underline'],
  17. ['image', 'code-block', 'link'],
  18. ],
  19. },
  20. placeholder: 'Compose an epic...',
  21. theme: 'bubble',
  22. }}
  23. >
  24. <h2>Minas Tirith</h2>
  25. <p>
  26. <br />
  27. </p>
  28. <p>
  29. Pippin looked out from the shelter of Gandalf"s cloak. He wondered if he
  30. was awake or still sleeping, still in the swift-moving dream in which he
  31. had been wrapped so long since the great ride began. The dark world was
  32. rushing by and the wind sang loudly in his ears. He could see nothing but
  33. the wheeling stars, and away to his right vast shadows against the sky
  34. where the mountains of the South marched past. Sleepily he tried to reckon
  35. the times and stages of their journey, but his memory was drowsy and
  36. uncertain.
  37. </p>
  38. <p>
  39. <br />
  40. </p>
  41. <p>
  42. There had been the first ride at terrible speed without a halt, and then
  43. in the dawn he had seen a pale gleam of gold, and they had come to the
  44. silent town and the great empty house on the hill. And hardly had they
  45. reached its shelter when the winged shadow had passed over once again, and
  46. men wilted with fear. But Gandalf had spoken soft words to him, and he had
  47. slept in a corner, tired but uneasy, dimly aware of comings and goings and
  48. of men talking and Gandalf giving orders. And then again riding, riding in
  49. the night. This was the second, no, the third night since he had looked in
  50. the Stone. And with that hideous memory he woke fully, and shivered, and
  51. the noise of the wind became filled with menacing voices.
  52. </p>
  53. <p>
  54. <br />
  55. </p>
  56. <p>
  57. A light kindled in the sky, a blaze of yellow fire behind dark barriers
  58. Pippin cowered back, afraid for a moment, wondering into what dreadful
  59. country Gandalf was bearing him. He rubbed his eyes, and then he saw that
  60. it was the moon rising above the eastern shadows, now almost at the full.
  61. So the night was not yet old and for hours the dark journey would go on.
  62. He stirred and spoke.
  63. </p>
  64. <p>
  65. <br />
  66. </p>
  67. <p>"Where are we, Gandalf?" he asked.</p>
  68. <p>
  69. <br />
  70. </p>
  71. <p>
  72. "In the realm of Gondor," the wizard answered. "The land of Anórien is
  73. still passing by."
  74. </p>
  75. <p>
  76. <br />
  77. </p>
  78. <p>
  79. There was a silence again for a while. Then, "What is that?" cried Pippin
  80. suddenly, clutching at Gandalf"s cloak. "Look! Fire, red fire! Are there
  81. dragons in this land? Look, there is another!"
  82. </p>
  83. <p>
  84. <br />
  85. </p>
  86. <p>
  87. For answer Gandalf cried aloud to his horse. "On, Shadowfax! We must
  88. hasten. Time is short. See! The beacons of Gondor are alight, calling for
  89. aid. War is kindled. See, there is the fire on Amon Dîn, and flame on
  90. Eilenach; and there they go speeding west: Nardol, Erelas, Min-Rimmon,
  91. Calenhad, and the Halifirien on the borders of Rohan."
  92. </p>
  93. <p>
  94. <br />
  95. </p>
  96. <p>
  97. But Shadowfax paused in his stride, slowing to a walk, and then he lifted
  98. up his head and neighed. And out of the darkness the answering neigh of
  99. other horses came; and presently the thudding of hoofs was heard, and
  100. three riders swept up and passed like flying ghosts in the moon and
  101. vanished into the West. Then Shadowfax gathered himself together and
  102. sprang away, and the night flowed over him like a roaring wind.
  103. </p>
  104. <p>
  105. <br />
  106. </p>
  107. <p>
  108. Pippin became drowsy again and paid little attention to Gandalf telling
  109. him of the customs of Gondor, and how the Lord of the City had beacons
  110. built on the tops of outlying hills along both borders of the great range,
  111. and maintained posts at these points where fresh horses were always in
  112. readiness to bear his errand-riders to Rohan in the North, or to Belfalas
  113. in the South. "It is long since the beacons of the North were lit," he
  114. said; "and in the ancient days of Gondor they were not needed, for they
  115. had the Seven Stones." Pippin stirred uneasily.
  116. </p>
  117. <p>
  118. <br />
  119. </p>
  120. <p>
  121. "Sleep again, and do not be afraid!" said Gandalf. "For you are not going
  122. like Frodo to Mordor, but to Minas Tirith, and there you will be as safe
  123. as you can be anywhere in these days. If Gondor falls, or the Ring is
  124. taken, then the Shire will be no refuge."
  125. </p>
  126. <p>
  127. <br />
  128. </p>
  129. <p>
  130. "You do not comfort me," said Pippin, but nonetheless sleep crept over
  131. him. The last thing that he remembered before he fell into deep dream was
  132. a glimpse of high white peaks, glimmering like floating isles above the
  133. clouds as they caught the light of the westering moon. He wondered where
  134. Frodo was, and if he was already in Mordor, or if he was dead; and he did
  135. not know that Frodo from far away looked on that same moon as it set
  136. beyond Gondor ere the coming of the day.
  137. </p>
  138. </Editor>
  139. </div>