# क्रमांक वाली सूची {#ordered-list}

Source: [React एडिटर में क्रमांकित सूची जोड़ें · Yurich](https://leeyujoo.com/yurich/hi/features/ordered-list/)

Package: [`yurich`](https://www.npmjs.com/package/yurich)

Package version: `0.1.2`

क्रम वाले कदमों को नंबर दें।

## आज़माएँ {#try-it}

दोनों पैराग्राफ़ चुनकर **क्रमांकित सूची** दबाएँ। दो `<li>` वाला `<ol>` बनता है।

## एडिटर में जोड़ें {#setup}

`OrderedList` चालू करें और क्रम वाले कदमों के लिए `toggleOrderedList` चलाएँ।

```tsx
import { EditorContent, EditorProvider, OrderedList, useEditor, useIsActive } from 'yurich';

export function OrderedListEditor() {
  const editor = useEditor({
    extensions: [OrderedList],
    initialValue: "<p>Yurich इंस्टॉल करें</p><p>बोल्ड बटन के लिए जगह चुनें</p>",
  });
  const active = useIsActive(editor, 'toggleOrderedList');

  return (
    <EditorProvider editor={editor}>
      <button
        type="button"
        aria-pressed={active}
        onMouseDown={event => event.preventDefault()}
        onClick={() => editor.execute('toggleOrderedList')}
      >
        क्रमांकित सूची
      </button>
      <EditorContent ariaLabel="एडिटर" />
    </EditorProvider>
  );
}
```

## ध्यान देने योग्य व्यवहार {#behavior}

कर्सर किसी एक आइटम में हो तो कमांड वहीं लागू होता है। बीच के आइटम को हटाने से सूची बँट सकती है।

[सुविधाएँ](https://leeyujoo.com/yurich/hi/features/)
