prosemirror-schema-basic 1.2.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/LICENSE +1 -1
- package/dist/index.d.cts +87 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/LICENSE
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Copyright (C) 2015-2017 by Marijn Haverbeke <
|
|
1
|
+
Copyright (C) 2015-2017 by Marijn Haverbeke <marijn@haverbeke.berlin> and others
|
|
2
2
|
|
|
3
3
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4
4
|
of this software and associated documentation files (the "Software"), to deal
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { NodeSpec, MarkSpec, Schema } from 'prosemirror-model';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
[Specs](https://prosemirror.net/docs/ref/#model.NodeSpec) for the nodes defined in this schema.
|
|
5
|
+
*/
|
|
6
|
+
declare const nodes: {
|
|
7
|
+
/**
|
|
8
|
+
NodeSpec The top level document node.
|
|
9
|
+
*/
|
|
10
|
+
doc: NodeSpec;
|
|
11
|
+
/**
|
|
12
|
+
A plain paragraph textblock. Represented in the DOM
|
|
13
|
+
as a `<p>` element.
|
|
14
|
+
*/
|
|
15
|
+
paragraph: NodeSpec;
|
|
16
|
+
/**
|
|
17
|
+
A blockquote (`<blockquote>`) wrapping one or more blocks.
|
|
18
|
+
*/
|
|
19
|
+
blockquote: NodeSpec;
|
|
20
|
+
/**
|
|
21
|
+
A horizontal rule (`<hr>`).
|
|
22
|
+
*/
|
|
23
|
+
horizontal_rule: NodeSpec;
|
|
24
|
+
/**
|
|
25
|
+
A heading textblock, with a `level` attribute that
|
|
26
|
+
should hold the number 1 to 6. Parsed and serialized as `<h1>` to
|
|
27
|
+
`<h6>` elements.
|
|
28
|
+
*/
|
|
29
|
+
heading: NodeSpec;
|
|
30
|
+
/**
|
|
31
|
+
A code listing. Disallows marks or non-text inline
|
|
32
|
+
nodes by default. Represented as a `<pre>` element with a
|
|
33
|
+
`<code>` element inside of it.
|
|
34
|
+
*/
|
|
35
|
+
code_block: NodeSpec;
|
|
36
|
+
/**
|
|
37
|
+
The text node.
|
|
38
|
+
*/
|
|
39
|
+
text: NodeSpec;
|
|
40
|
+
/**
|
|
41
|
+
An inline image (`<img>`) node. Supports `src`,
|
|
42
|
+
`alt`, and `href` attributes. The latter two default to the empty
|
|
43
|
+
string.
|
|
44
|
+
*/
|
|
45
|
+
image: NodeSpec;
|
|
46
|
+
/**
|
|
47
|
+
A hard line break, represented in the DOM as `<br>`.
|
|
48
|
+
*/
|
|
49
|
+
hard_break: NodeSpec;
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
[Specs](https://prosemirror.net/docs/ref/#model.MarkSpec) for the marks in the schema.
|
|
53
|
+
*/
|
|
54
|
+
declare const marks: {
|
|
55
|
+
/**
|
|
56
|
+
A link. Has `href` and `title` attributes. `title`
|
|
57
|
+
defaults to the empty string. Rendered and parsed as an `<a>`
|
|
58
|
+
element.
|
|
59
|
+
*/
|
|
60
|
+
link: MarkSpec;
|
|
61
|
+
/**
|
|
62
|
+
An emphasis mark. Rendered as an `<em>` element. Has parse rules
|
|
63
|
+
that also match `<i>` and `font-style: italic`.
|
|
64
|
+
*/
|
|
65
|
+
em: MarkSpec;
|
|
66
|
+
/**
|
|
67
|
+
A strong mark. Rendered as `<strong>`, parse rules also match
|
|
68
|
+
`<b>` and `font-weight: bold`.
|
|
69
|
+
*/
|
|
70
|
+
strong: MarkSpec;
|
|
71
|
+
/**
|
|
72
|
+
Code font mark. Represented as a `<code>` element.
|
|
73
|
+
*/
|
|
74
|
+
code: MarkSpec;
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
This schema roughly corresponds to the document schema used by
|
|
78
|
+
[CommonMark](http://commonmark.org/), minus the list elements,
|
|
79
|
+
which are defined in the [`prosemirror-schema-list`](https://prosemirror.net/docs/ref/#schema-list)
|
|
80
|
+
module.
|
|
81
|
+
|
|
82
|
+
To reuse elements from this schema, extend or read from its
|
|
83
|
+
`spec.nodes` and `spec.marks` [properties](https://prosemirror.net/docs/ref/#model.Schema.spec).
|
|
84
|
+
*/
|
|
85
|
+
declare const schema: Schema<"blockquote" | "image" | "text" | "doc" | "paragraph" | "horizontal_rule" | "heading" | "code_block" | "hard_break", "link" | "code" | "em" | "strong">;
|
|
86
|
+
|
|
87
|
+
export { marks, nodes, schema };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "prosemirror-schema-basic",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"description": "Basic schema elements for ProseMirror",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"maintainers": [
|
|
16
16
|
{
|
|
17
17
|
"name": "Marijn Haverbeke",
|
|
18
|
-
"email": "
|
|
18
|
+
"email": "marijn@haverbeke.berlin",
|
|
19
19
|
"web": "http://marijnhaverbeke.nl"
|
|
20
20
|
}
|
|
21
21
|
],
|