add details experiment
This commit is contained in:
29
docs/src/demos/Experiments/Details/details-summary.ts
Normal file
29
docs/src/demos/Experiments/Details/details-summary.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import { Node } from '@tiptap/core'
|
||||
|
||||
export interface DetailsSummaryOptions {
|
||||
HTMLAttributes: {
|
||||
[key: string]: any
|
||||
},
|
||||
}
|
||||
|
||||
export default Node.create({
|
||||
name: 'detailsSummary',
|
||||
|
||||
content: 'inline*',
|
||||
|
||||
group: 'block',
|
||||
|
||||
defaultOptions: <DetailsSummaryOptions>{
|
||||
HTMLAttributes: {},
|
||||
},
|
||||
|
||||
parseHTML() {
|
||||
return [{
|
||||
tag: 'summary',
|
||||
}]
|
||||
},
|
||||
|
||||
renderHTML() {
|
||||
return ['summary', 0]
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user