How to use the @edtr-io/ui.edtrTextControls.listNumbered function in @edtr-io/ui

To help you get started, we’ve selected a few @edtr-io/ui examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github edtr-io / edtr-io / packages / plugins / text / src / controls / default.tsx View on Github external
onClick={() => {
          if (
            !isList(unorderedListNode)(editor) &&
            !isList(orderedListNode)(editor)
          ) {
            toggleList(unorderedListNode)(props.editor).focus()
            props.onChange(editor)
          }
          props.switchControls(VisibleControls.Lists)
        }}
        title="Listen"
      >
        
      
      <button> {
          if (isBlockquote(editor, pluginClosure)) {
            removeBlockquote(editor, pluginClosure)
            props.onChange(editor)
          } else {
            createBlockquote(editor, name)
            props.onChange(editor)
          }
        }}</button>
github edtr-io / edtr-io / packages / plugins / text / src / controls / lists.tsx View on Github external
export const ListControls: React.FunctionComponent = props =&gt; {
  return (
    
      <button> {
          toggleList(orderedListNode)(props.editor).focus()
          props.onChange(props.editor)
        }}
        title="Nummerierte Liste"
      &gt;
        
      </button>
      <button> {
          toggleList(unorderedListNode)(props.editor).focus()
          if (!isList(unorderedListNode)(props.editor)) {
            props.switchControls(VisibleControls.All)
          }
          props.onChange(props.editor)
        }}
        title="Aufzählung"
      &gt;
        
      </button>