prosemirror-schema-basic
Advanced tools
Comparing version 1.2.2 to 1.2.3
@@ -0,1 +1,7 @@ | ||
## 1.2.3 (2024-07-14) | ||
### Bug fixes | ||
Add attribute type validation for headings, images, and link marks. | ||
## 1.2.2 (2023-05-17) | ||
@@ -2,0 +8,0 @@ |
@@ -48,3 +48,3 @@ import { Schema } from 'prosemirror-model'; | ||
heading: { | ||
attrs: { level: { default: 1 } }, | ||
attrs: { level: { default: 1, validate: "number" } }, | ||
content: "inline*", | ||
@@ -89,5 +89,5 @@ group: "block", | ||
attrs: { | ||
src: {}, | ||
alt: { default: null }, | ||
title: { default: null } | ||
src: { validate: "string" }, | ||
alt: { default: null, validate: "string|null" }, | ||
title: { default: null, validate: "string|null" } | ||
}, | ||
@@ -128,4 +128,4 @@ group: "inline", | ||
attrs: { | ||
href: {}, | ||
title: { default: null } | ||
href: { validate: "string" }, | ||
title: { default: null, validate: "string|null" } | ||
}, | ||
@@ -132,0 +132,0 @@ inclusive: false, |
{ | ||
"name": "prosemirror-schema-basic", | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"description": "Basic schema elements for ProseMirror", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -43,3 +43,3 @@ import {Schema, NodeSpec, MarkSpec, DOMOutputSpec} from "prosemirror-model" | ||
heading: { | ||
attrs: {level: {default: 1}}, | ||
attrs: {level: {default: 1, validate: "number"}}, | ||
content: "inline*", | ||
@@ -81,5 +81,5 @@ group: "block", | ||
attrs: { | ||
src: {}, | ||
alt: {default: null}, | ||
title: {default: null} | ||
src: {validate: "string"}, | ||
alt: {default: null, validate: "string|null"}, | ||
title: {default: null, validate: "string|null"} | ||
}, | ||
@@ -117,4 +117,4 @@ group: "inline", | ||
attrs: { | ||
href: {}, | ||
title: {default: null} | ||
href: {validate: "string"}, | ||
title: {default: null, validate: "string|null"} | ||
}, | ||
@@ -121,0 +121,0 @@ inclusive: false, |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
29901
656