???? ??? ?? ??? RichText ???? React ?? ????? ??? TipTap? ??? ?????. ? ????? TipTap? ????? ???? ?? ??? ??? ?? ?? ??? ???? ??? ?????.
??? ?? ???
? ????? ??? ??? ?? ???.
- TipTap?? ??? ?? ??? ?? RichText ???.
- @? ?? ??? ?? ??, ?? ?? ?? ??
- ?? ??? ??? ? ?? ??? ?? ???? ?? ??? ?? ???
TipTap? ?? ??? ??? ??? ?? ??? ????? GitHub ???? ?????.
1??: ??? ??
???? ?? ?? ?????? ?????.
npm install @tiptap/react @tiptap/starter-kit @tiptap/extension-mention
2??: ?? RichText ??? ???
RichTextEditor ?? ??? ??? ??? ?????. ??? ??? ??? ????.
import { useEditor, EditorContent } from '@tiptap/react'; import StarterKit from '@tiptap/starter-kit'; export const RichTextEditor = ({ content, onChange }) => { const editor = useEditor({ extensions: [StarterKit], content: content, onUpdate: ({ editor }) => { onChange(editor.getHTML()); }, }); return <EditorContent editor={editor} />; };
3??: ?? ??
??? ?? ???? ?? ???????? ??? ?? ??? ??????. ?? ?????:
- ?? ?? ?? ? ??
?? ??? ????? RichTextEditor ?? ??? ?????.
import Mention from '@tiptap/extension-mention'; export const RichTextEditor = ({ content, onChange, mentions }) => { const editor = useEditor({ extensions: [ StarterKit, Mention.configure({ HTMLAttributes: { class: 'mention' }, suggestion: { items: ({ query }) => mentions.filter(item => item.display.toLowerCase().includes(query.toLowerCase())).slice(0, 5), render: () => { let component; let popup; return { onStart: (props) => { popup = document.createElement('div'); popup.className = 'mention-popup'; document.body.appendChild(popup); component = { updateProps: () => { popup.innerHTML = ` <div> <h3> Step 4: Style the Mentions Popup </h3> <p>Mentions should be visually distinct. Add the following styles to enhance usability:<br> </p> <pre class="brush:php;toolbar:false">.mention-popup { background: white; border-radius: 8px; box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.1); padding: 8px; position: absolute; z-index: 1000; } .mention-popup .items { display: flex; flex-direction: column; } .mention-popup .item { padding: 8px; cursor: pointer; border-radius: 4px; } .mention-popup .item:hover, .mention-popup .item.is-selected { background: #f0f0f0; }
5??: ?? ?? ??? ???? ??
- ?? ??: ???? ?? ?? ??? ????? ??? ????? ?? ??? ????? ?????.
const editor = useEditor({ extensions: [StarterKit], content, onUpdate: ({ editor }) => { const selection = editor.state.selection; onChange(editor.getHTML()); editor.commands.setTextSelection(selection); }, });
- ???? ?? ?????:
???? ?? ?? ? ??? ????? ????? ??? ?????.
import Placeholder from '@tiptap/extension-placeholder'; const editor = useEditor({ extensions: [ StarterKit, Placeholder.configure({ placeholder: 'Type something...' }), ], });
- ?? ??? ???? ??: presents.items ???? ???? ?? ??? ????? ????? ?????.
6??: ?? ??
?? ?? ?? ?? ??? ???? ???? ???? ??? ?? ? ? ??? ??? ????. ?? ??? ????.
import React from 'react'; const NotificationForm = ({ mentions, onSubmit }) => { const [content, setContent] = React.useState(''); return ( <form onSubmit={() => onSubmit(content)}> <RichTextEditor content={content} onChange={setContent} mentions={mentions} /> <button type="submit">Send</button> </form> ); };
??
TipTap? ???? ?????? ??? ???? RichText ???? ??? ? ????. ??? ???? ?? ?????? ???? ???? ???? ?????.
??? ??? TipTap ?? ????? ?????. ? ???? ??? ?? ?????? ??? ?????! ?
? ??? React?? TipTap? ???? RichText ??? ??(?? ??)? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)

??? ??











Java ? JavaScript? ?? ?? ????? ??? ?? ?? ?? ???? ????? ?????. Java? ??? ? ??? ?????? ??? ???? JavaScript? ?? ? ??? ??? ?????.

JavaScriptCommentsareEnsentialformaining, ?? ? ???? 1) Single-LinecommentsERUSEDFORQUICKEXPLANATIONS.2) Multi-linecommentSexplaincleClexLogicOrprovidedEdeDDocumentation.3) inlineecommentsClarifySpecificPartSofcode.bestPractic

JavaScript?? ??? ??? ?? ? ? ?? ??? ???????. 1. ?? ??? ??? ???? ?? ??? ????. ISO ?? ???? ???? ???? ???? ?? ????. 2. ?? ??? ?? ???? ??? ?? ???? ??? ? ??? ? ?? 0?? ????? ?? ??????. 3. ?? ?? ???? ???? ???? ?? ?????? ??? ? ????. 4. Luxon? ?? ???? ???? ?????? ???? ?? ????. ??? ?? ???? ????? ???? ??? ????? ?? ? ????.

TAGGSATTHEBOTTOMOFABLOGPOSTORWEBPAGESERVESPRACTICALPURSEO, USEREXPERIENCE, andDESIGN.1.ITHELPSWITHEOBYOWNSESPORENGENSTOESTOCESKESKERKESKERKERKERDER-RELEVANTTAGSWITHOUTHINGTEMAINCONTENT.2.ITIMPROVESEREXPERKEEPINGTOPONTEFOCUSOFOFOFOCUSOFOFOFOCUCUSONTHEATECLL

JavaScriptIspreferredforwebDevelopment, whithjavaisbetterforlarge-scalebackendsystemsandandandoidapps.1) javascriptexcelsincreatinginteractivewebexperiences withitsdynatureanddommanipulation.2) javaoffersstrongtypingandobject-Orientededededededededededededededededdec

javascriptassevenfundamentalDatatatypes : ??, ???, ??, unull, ??, ? symbol.1) ?? seAdouble-precisionformat, ??? forwidevaluerangesbutbecautiouswithfatingfointarithmetic.2) stringsareimmutable, useefficientconcatenationmethendsf

??? ?? ? ??? DOM?? ??? ??? ? ?????. ??? ?? ????? ?? ??????, ??? ?? ???? ?? ????????. 1. ??? ??? addeventListener? usecapture ?? ??? true? ???? ?????. 2. ??? ??? ?? ???? usecapture? ???? ????? ?????. 3. ??? ??? ??? ??? ???? ? ??? ? ????. 4. ??? ?? ?? ?? ??? ?? ??? ??????? ??? ???? ?????. 5. ??? ?? ?? ?? ??? ?? ???? ?? ???? ? ??? ? ????. ? ? ??? ???? ???? JavaScript? ??? ??? ??? ????? ???? ???? ??? ??????.

Java? JavaScript? ?? ????? ?????. 1. Java? ???? ???? ??? ? ??? ?????? ?????? ? ?? ???? ?????. 2. JavaScript? ?? ? ?? ?? ? ??? ?? ??? ???? ??? ? ?? ? ?? ?????.
