hr.js 366 B

123456789101112131415161718
  1. import React from "react"
  2. import Action from "./action"
  3. export default function(props) {
  4. return (
  5. <Action
  6. execAction={insertHr}
  7. title={gettext("Insert horizontal ruler")}
  8. {...props}
  9. >
  10. <span className="material-icon">remove</span>
  11. </Action>
  12. )
  13. }
  14. export function insertHr(selection, replace) {
  15. replace("\n\n- - - - -\n\n")
  16. }