@toast-ui/editor-plugin-table-merged-cell
Advanced tools
Comparing version 1.0.0 to 1.1.0-alpha.0
128
index.d.ts
type Plugin = (editor: any, options?: any) => void; | ||
export default function tableMergedCellPlugin(): Plugin; | ||
type SourcePos = [[number, number], [number, number]]; | ||
type BlockNodeType = | ||
| 'document' | ||
| 'list' | ||
| 'blockQuote' | ||
| 'item' | ||
| 'heading' | ||
| 'thematicBreak' | ||
| 'paragraph' | ||
| 'codeBlock' | ||
| 'htmlBlock' | ||
| 'table' | ||
| 'tableHead' | ||
| 'tableBody' | ||
| 'tableRow' | ||
| 'tableCell' | ||
| 'tableDelimRow' | ||
| 'tableDelimCell' | ||
| 'refDef'; | ||
type InlineNodeType = | ||
| 'code' | ||
| 'text' | ||
| 'emph' | ||
| 'strong' | ||
| 'strike' | ||
| 'link' | ||
| 'image' | ||
| 'htmlInline' | ||
| 'linebreak' | ||
| 'softbreak'; | ||
type NodeType = BlockNodeType | InlineNodeType; | ||
interface MdNode { | ||
type: NodeType; | ||
id: number; | ||
parent: MdNode | null; | ||
prev: MdNode | null; | ||
next: MdNode | null; | ||
sourcepos?: SourcePos; | ||
firstChild: MdNode | null; | ||
lastChild: MdNode | null; | ||
literal: string | null; | ||
isContainer(): boolean; | ||
unlink(): void; | ||
replaceWith(node: MdNode): void; | ||
insertAfter(node: MdNode): void; | ||
insertBefore(node: MdNode): void; | ||
appendChild(child: MdNode): void; | ||
prependChild(child: MdNode): void; | ||
walker(): NodeWalker; | ||
} | ||
interface NodeWalker { | ||
current: MdNode | null; | ||
root: MdNode; | ||
entering: boolean; | ||
next(): { entering: boolean; node: MdNode } | null; | ||
resumeAt(node: MdNode, entering: boolean): void; | ||
} | ||
type CustomParser = (node: MdNode, context: { entering: boolean }) => void; | ||
type CustomParserMap = Partial<Record<NodeType, CustomParser>>; | ||
interface Options { | ||
gfm: boolean; | ||
softbreak: string; | ||
nodeId: boolean; | ||
tagFilter: boolean; | ||
convertors?: HTMLConvertorMap; | ||
} | ||
interface Context { | ||
entering: boolean; | ||
leaf: boolean; | ||
options: Omit<Options, 'gfm' | 'convertors'>; | ||
getChildrenText: (node: MdNode) => string; | ||
skipChildren: () => void; | ||
origin?: () => ReturnType<HTMLConvertor>; | ||
} | ||
interface TagToken { | ||
tagName: string; | ||
outerNewLine?: boolean; | ||
innerNewLine?: boolean; | ||
} | ||
interface OpenTagToken extends TagToken { | ||
type: 'openTag'; | ||
classNames?: string[]; | ||
attributes?: Record<string, string>; | ||
selfClose?: boolean; | ||
} | ||
interface CloseTagToken extends TagToken { | ||
type: 'closeTag'; | ||
} | ||
interface TextToken { | ||
type: 'text'; | ||
content: string; | ||
} | ||
interface RawHTMLToken { | ||
type: 'html'; | ||
content: string; | ||
outerNewLine?: boolean; | ||
} | ||
type HTMLToken = OpenTagToken | CloseTagToken | TextToken | RawHTMLToken; | ||
type HTMLConvertor = (node: MdNode, context: Context) => HTMLToken | HTMLToken[] | null; | ||
type HTMLConvertorMap = Partial<Record<NodeType, HTMLConvertor>>; | ||
interface PluginInfo { | ||
pluginFn: Plugin; | ||
renderer: HTMLConvertorMap; | ||
parser: CustomParserMap; | ||
} | ||
declare const tableMergedCell: PluginInfo; | ||
declare module '@toast-ui/editor-plugin-table-merged-cell' { | ||
export default tableMergedCell; | ||
} |
{ | ||
"name": "@toast-ui/editor-plugin-table-merged-cell", | ||
"version": "1.0.0", | ||
"version": "1.1.0-alpha.0", | ||
"description": "TOAST UI Editor : Table Merged Cell Plugin", | ||
@@ -43,4 +43,6 @@ "keywords": [ | ||
"@toast-ui/editor": "^2.0.0", | ||
"@toast-ui/toastmark": "file:../../libs/toastmark", | ||
"babel-loader": "^8.0.6", | ||
"babel-plugin-istanbul": "^6.0.0", | ||
"common-tags": "^1.8.0", | ||
"cross-env": "^6.0.3", | ||
@@ -47,0 +49,0 @@ "eslint": "^6.8.0", |
@@ -115,3 +115,3 @@ # TOAST UI Editor : Table Merged Cell Plugin | ||
<!-- Editor --> | ||
<script src="https://uicdn.toast.com/editor/latest/toastui-editor.min.js"></script> | ||
<script src="https://uicdn.toast.com/editor/latest/toastui-editor-all.min.js"></script> | ||
<!-- Editor's Plugin --> | ||
@@ -118,0 +118,0 @@ <script src="https://uicdn.toast.com/editor-plugin-table-merged-cell/latest/toastui-editor-plugin-table-merged-cell.min.js"></script> |
Sorry, the diff of this file is too big to display
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
144466
3756
31
1