@tiptap/extension-paragraph
Advanced tools
Comparing version 2.0.0-alpha.4 to 2.0.0-alpha.5
@@ -6,2 +6,10 @@ # Change Log | ||
# [2.0.0-alpha.5](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/extension-paragraph@2.0.0-alpha.4...@tiptap/extension-paragraph@2.0.0-alpha.5) (2020-12-18) | ||
**Note:** Version bump only for package @tiptap/extension-paragraph | ||
# [2.0.0-alpha.4](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/extension-paragraph@2.0.0-alpha.3...@tiptap/extension-paragraph@2.0.0-alpha.4) (2020-12-02) | ||
@@ -8,0 +16,0 @@ |
@@ -1,18 +0,3 @@ | ||
import { Command, Node } from '@tiptap/core'; | ||
export interface ParagraphOptions { | ||
HTMLAttributes: { | ||
[key: string]: any; | ||
}; | ||
} | ||
declare const Paragraph: Node<ParagraphOptions, { | ||
/** | ||
* Toggle a paragraph | ||
*/ | ||
setParagraph: () => Command; | ||
}>; | ||
import { Paragraph } from './paragraph'; | ||
export * from './paragraph'; | ||
export default Paragraph; | ||
declare module '@tiptap/core' { | ||
interface AllExtensions { | ||
Paragraph: typeof Paragraph; | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("@tiptap/core")):"function"==typeof define&&define.amd?define(["@tiptap/core"],t):(e="undefined"!=typeof globalThis?globalThis:e||self)["@tiptap/extension-paragraph"]=t(e["@tiptap/core"])}(this,(function(e){"use strict";return e.Node.create({name:"paragraph",defaultOptions:{HTMLAttributes:{}},group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:t}){return["p",e.mergeAttributes(this.options.HTMLAttributes,t),0]},addCommands:()=>({setParagraph:()=>({commands:e})=>e.toggleNode("paragraph","paragraph")}),addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}})})); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@tiptap/core")):"function"==typeof define&&define.amd?define(["exports","@tiptap/core"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@tiptap/extension-paragraph"]={},e["@tiptap/core"])}(this,(function(e,t){"use strict";const r=t.Node.create({name:"paragraph",defaultOptions:{HTMLAttributes:{}},group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:e}){return["p",t.mergeAttributes(this.options.HTMLAttributes,e),0]},addCommands:()=>({setParagraph:()=>({commands:e})=>e.toggleNode("paragraph","paragraph")}),addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}});e.Paragraph=r,e.default=r,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=tiptap-extension-paragraph.bundle.umd.min.js.map |
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
var core = require('@tiptap/core'); | ||
@@ -37,3 +39,4 @@ | ||
module.exports = Paragraph; | ||
exports.Paragraph = Paragraph; | ||
exports.default = Paragraph; | ||
//# sourceMappingURL=tiptap-extension-paragraph.cjs.js.map |
@@ -36,2 +36,3 @@ import { Node, mergeAttributes } from '@tiptap/core'; | ||
export default Paragraph; | ||
export { Paragraph }; | ||
//# sourceMappingURL=tiptap-extension-paragraph.esm.js.map |
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@tiptap/core')) : | ||
typeof define === 'function' && define.amd ? define(['@tiptap/core'], factory) : | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global['@tiptap/extension-paragraph'] = factory(global.core)); | ||
}(this, (function (core) { 'use strict'; | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@tiptap/core')) : | ||
typeof define === 'function' && define.amd ? define(['exports', '@tiptap/core'], factory) : | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global['@tiptap/extension-paragraph'] = {}, global.core)); | ||
}(this, (function (exports, core) { 'use strict'; | ||
@@ -39,5 +39,8 @@ const Paragraph = core.Node.create({ | ||
return Paragraph; | ||
exports.Paragraph = Paragraph; | ||
exports.default = Paragraph; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
}))); | ||
//# sourceMappingURL=tiptap-extension-paragraph.umd.js.map |
{ | ||
"name": "@tiptap/extension-paragraph", | ||
"description": "paragraph extension for tiptap", | ||
"version": "2.0.0-alpha.4", | ||
"version": "2.0.0-alpha.5", | ||
"homepage": "https://tiptap.dev", | ||
@@ -27,3 +27,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "a884cb81de8783d0097741c1ddb97a82ea88ae0e" | ||
"gitHead": "0371cb0a5d803a44d93532aa34419ec7ffffdc24" | ||
} |
@@ -1,54 +0,5 @@ | ||
import { Command, Node, mergeAttributes } from '@tiptap/core' | ||
import { Paragraph } from './paragraph' | ||
export interface ParagraphOptions { | ||
HTMLAttributes: { | ||
[key: string]: any | ||
}, | ||
} | ||
export * from './paragraph' | ||
const Paragraph = Node.create({ | ||
name: 'paragraph', | ||
defaultOptions: <ParagraphOptions>{ | ||
HTMLAttributes: {}, | ||
}, | ||
group: 'block', | ||
content: 'inline*', | ||
parseHTML() { | ||
return [ | ||
{ tag: 'p' }, | ||
] | ||
}, | ||
renderHTML({ HTMLAttributes }) { | ||
return ['p', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0] | ||
}, | ||
addCommands() { | ||
return { | ||
/** | ||
* Toggle a paragraph | ||
*/ | ||
setParagraph: (): Command => ({ commands }) => { | ||
return commands.toggleNode('paragraph', 'paragraph') | ||
}, | ||
} | ||
}, | ||
addKeyboardShortcuts() { | ||
return { | ||
'Mod-Alt-0': () => this.editor.commands.setParagraph(), | ||
} | ||
}, | ||
}) | ||
export default Paragraph | ||
declare module '@tiptap/core' { | ||
interface AllExtensions { | ||
Paragraph: typeof Paragraph, | ||
} | ||
} |
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
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
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
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
17490
16
183