# बोल्ड {#bold}

Source: [React एडिटर में बोल्ड बटन जोड़ें · Yurich](https://leeyujoo.com/yurich/hi/features/bold/)

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

Package version: `0.1.2`

चुने हुए टेक्स्ट को बोल्ड करें।

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

“Yurich” चुनकर **बोल्ड** पर क्लिक करें। आउटपुट में `<strong>Yurich</strong>` आता है। फिर क्लिक करने पर बोल्ड हटता है।

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

`Bold` को `extensions` में जोड़ें, बटन से `toggleBold` चलाएँ और `useIsActive` से स्थिति पढ़ें।

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

export function BoldEditor() {
  const editor = useEditor({
    extensions: [Bold],
    initialValue: "<p>Yurich पर थोड़ा ज़ोर दें।</p>",
  });
  const active = useIsActive(editor, 'toggleBold');

  return (
    <EditorProvider editor={editor}>
      <button
        type="button"
        aria-pressed={active}
        onMouseDown={event => event.preventDefault()}
        onClick={() => editor.execute('toggleBold')}
      >
        बोल्ड
      </button>
      <EditorContent ariaLabel="एडिटर" />
    </EditorProvider>
  );
}
```

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

शॉर्टकट `Mod+B` है। सिर्फ़ कर्सर से बदलाव नहीं होता। चयन का कुछ हिस्सा बोल्ड हो तो पूरा चयन बोल्ड हो जाता है।

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