# इटैलिक {#italic}

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

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

Package version: `0.1.2`

टेक्स्ट को इटैलिक करके ज़ोर दें।

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

“Yurich” चुनकर **इटैलिक** दबाएँ। परिणाम में `<em>Yurich</em>` आता है।

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

`Italic` चालू करके बटन से `toggleItalic` चलाएँ। `onMouseDown` से चयन बनाए रखें।

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

export function ItalicEditor() {
  const editor = useEditor({
    extensions: [Italic],
    initialValue: "<p>Yurich का इटैलिक रूप देखें।</p>",
  });
  const active = useIsActive(editor, 'toggleItalic');

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

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

`Mod+I` भी यही करता है। लोड किया गया `<i>` आउटपुट में `<em>` बनता है।

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