क्रमांक वाली सूची
क्रम वाले कदमों को नंबर दें।
आज़माएँ
दोनों पैराग्राफ़ चुनकर क्रमांकित सूची दबाएँ। दो <li> वाला <ol> बनता है।
लाइव उदाहरण
उदाहरण का परिणाम
एडिटर में जोड़ें
OrderedList चालू करें और क्रम वाले कदमों के लिए toggleOrderedList चलाएँ।
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>
);
}
ध्यान देने योग्य व्यवहार
कर्सर किसी एक आइटम में हो तो कमांड वहीं लागू होता है। बीच के आइटम को हटाने से सूची बँट सकती है।