@tiptap/extension-placeholder
Advanced tools
Comparing version 2.0.0-beta.1 to 2.0.0-beta.2
@@ -6,4 +6,12 @@ # Change Log | ||
# [2.0.0-beta.2](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/extension-placeholder@2.0.0-beta.1...@tiptap/extension-placeholder@2.0.0-beta.2) (2021-03-28) | ||
**Note:** Version bump only for package @tiptap/extension-placeholder | ||
# 2.0.0-beta.1 (2021-03-24) | ||
**Note:** Version bump only for package @tiptap/extension-placeholder |
@@ -1,6 +0,10 @@ | ||
import { Extension } from '@tiptap/core'; | ||
import { Editor, Extension } from '@tiptap/core'; | ||
import { Node as ProsemirrorNode } from 'prosemirror-model'; | ||
export interface PlaceholderOptions { | ||
emptyEditorClass: string; | ||
emptyNodeClass: string; | ||
placeholder: string | Function; | ||
placeholder: ((PlaceholderProps: { | ||
editor: Editor; | ||
node: ProsemirrorNode; | ||
}) => string) | string; | ||
showOnlyWhenEditable: boolean; | ||
@@ -7,0 +11,0 @@ showOnlyCurrent: boolean; |
@@ -40,3 +40,6 @@ 'use strict'; | ||
'data-placeholder': typeof this.options.placeholder === 'function' | ||
? this.options.placeholder(node) | ||
? this.options.placeholder({ | ||
editor: this.editor, | ||
node, | ||
}) | ||
: this.options.placeholder, | ||
@@ -43,0 +46,0 @@ }); |
@@ -36,3 +36,6 @@ import { Extension, isNodeEmpty } from '@tiptap/core'; | ||
'data-placeholder': typeof this.options.placeholder === 'function' | ||
? this.options.placeholder(node) | ||
? this.options.placeholder({ | ||
editor: this.editor, | ||
node, | ||
}) | ||
: this.options.placeholder, | ||
@@ -39,0 +42,0 @@ }); |
@@ -38,3 +38,6 @@ (function (global, factory) { | ||
'data-placeholder': typeof this.options.placeholder === 'function' | ||
? this.options.placeholder(node) | ||
? this.options.placeholder({ | ||
editor: this.editor, | ||
node, | ||
}) | ||
: this.options.placeholder, | ||
@@ -41,0 +44,0 @@ }); |
{ | ||
"name": "@tiptap/extension-placeholder", | ||
"description": "placeholder extension for tiptap", | ||
"version": "2.0.0-beta.1", | ||
"version": "2.0.0-beta.2", | ||
"homepage": "https://tiptap.dev", | ||
@@ -28,6 +28,7 @@ "keywords": [ | ||
"dependencies": { | ||
"prosemirror-model": "^1.13.3", | ||
"prosemirror-state": "^1.3.4", | ||
"prosemirror-view": "^1.18.1" | ||
}, | ||
"gitHead": "a0d71ed1894a5e7955635d6702fa3ec82b4540aa" | ||
"gitHead": "bb1dad7560554608535eb4ce2063518aefed025d" | ||
} |
@@ -1,2 +0,3 @@ | ||
import { Extension, isNodeEmpty } from '@tiptap/core' | ||
import { Editor, Extension, isNodeEmpty } from '@tiptap/core' | ||
import { Node as ProsemirrorNode } from 'prosemirror-model' | ||
import { Decoration, DecorationSet } from 'prosemirror-view' | ||
@@ -8,3 +9,6 @@ import { Plugin } from 'prosemirror-state' | ||
emptyNodeClass: string, | ||
placeholder: string | Function, | ||
placeholder: ((PlaceholderProps: { | ||
editor: Editor, | ||
node: ProsemirrorNode, | ||
}) => string) | string, | ||
showOnlyWhenEditable: boolean, | ||
@@ -52,3 +56,6 @@ showOnlyCurrent: boolean, | ||
'data-placeholder': typeof this.options.placeholder === 'function' | ||
? this.options.placeholder(node) | ||
? this.options.placeholder({ | ||
editor: this.editor, | ||
node, | ||
}) | ||
: this.options.placeholder, | ||
@@ -55,0 +62,0 @@ }) |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
876784
901
4
+ Addedprosemirror-model@^1.13.3