अंडरलाइन
चुने हुए टेक्स्ट के नीचे लाइन लगाएँ।
आज़माएँ
“Yurich” चुनकर अंडरलाइन दबाने पर <u>Yurich</u> मिलता है। दोबारा दबाने से अंडरलाइन हटती है।
लाइव उदाहरण
उदाहरण का परिणाम
एडिटर में जोड़ें
Underline चालू करें और बटन को toggleUnderline से जोड़ें।
import { EditorContent, EditorProvider, Underline, useEditor, useIsActive } from 'yurich';
export function UnderlineEditor() {
const editor = useEditor({
extensions: [Underline],
initialValue: "<p>Yurich के नीचे एक लाइन खींचें।</p>",
});
const active = useIsActive(editor, 'toggleUnderline');
return (
<EditorProvider editor={editor}>
<button
type="button"
aria-pressed={active}
onMouseDown={event => event.preventDefault()}
onClick={() => editor.execute('toggleUnderline')}
>
अंडरलाइन
</button>
<EditorContent ariaLabel="एडिटर" />
</EditorProvider>
);
}
ध्यान देने योग्य व्यवहार
शॉर्टकट Mod+U है। क्लिक करने योग्य पते के लिए Link इस्तेमाल करें।