@tiptap/extension-underline
Advanced tools
Comparing version 2.0.0-alpha.3 to 2.0.0-alpha.4
@@ -6,2 +6,10 @@ # Change Log | ||
# [2.0.0-alpha.4](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/extension-underline@2.0.0-alpha.3...@tiptap/extension-underline@2.0.0-alpha.4) (2020-12-02) | ||
**Note:** Version bump only for package @tiptap/extension-underline | ||
# [2.0.0-alpha.3](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/extension-underline@2.0.0-alpha.2...@tiptap/extension-underline@2.0.0-alpha.3) (2020-11-19) | ||
@@ -8,0 +16,0 @@ |
@@ -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-underline"]=t(e["@tiptap/core"])}(this,(function(e){"use strict";return e.Mark.create({name:"underline",defaultOptions:{HTMLAttributes:{}},parseHTML:()=>[{tag:"u"},{style:"text-decoration=underline"}],renderHTML:({HTMLAttributes:e})=>["u",e,0],addCommands:()=>({setUnderline:()=>({commands:e})=>e.setMark("underline"),toggleUnderline:()=>({commands:e})=>e.toggleMark("underline"),unsetUnderline:()=>({commands:e})=>e.unsetMark("underline")}),addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline()}}})})); | ||
!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-underline"]=t(e["@tiptap/core"])}(this,(function(e){"use strict";return e.Mark.create({name:"underline",defaultOptions:{HTMLAttributes:{}},parseHTML:()=>[{tag:"u"},{style:"text-decoration=underline"}],renderHTML({HTMLAttributes:t}){return["u",e.mergeAttributes(this.options.HTMLAttributes,t),0]},addCommands:()=>({setUnderline:()=>({commands:e})=>e.setMark("underline"),toggleUnderline:()=>({commands:e})=>e.toggleMark("underline"),unsetUnderline:()=>({commands:e})=>e.unsetMark("underline")}),addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline()}}})})); | ||
//# sourceMappingURL=tiptap-extension-underline.bundle.umd.min.js.map |
@@ -21,3 +21,3 @@ 'use strict'; | ||
renderHTML({ HTMLAttributes }) { | ||
return ['u', HTMLAttributes, 0]; | ||
return ['u', core.mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]; | ||
}, | ||
@@ -24,0 +24,0 @@ addCommands() { |
@@ -1,2 +0,2 @@ | ||
import { Mark } from '@tiptap/core'; | ||
import { Mark, mergeAttributes } from '@tiptap/core'; | ||
@@ -19,3 +19,3 @@ const Underline = Mark.create({ | ||
renderHTML({ HTMLAttributes }) { | ||
return ['u', HTMLAttributes, 0]; | ||
return ['u', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]; | ||
}, | ||
@@ -22,0 +22,0 @@ addCommands() { |
@@ -23,3 +23,3 @@ (function (global, factory) { | ||
renderHTML({ HTMLAttributes }) { | ||
return ['u', HTMLAttributes, 0]; | ||
return ['u', core.mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]; | ||
}, | ||
@@ -26,0 +26,0 @@ addCommands() { |
{ | ||
"name": "@tiptap/extension-underline", | ||
"version": "2.0.0-alpha.3", | ||
"description": "underline extension for tiptap", | ||
"version": "2.0.0-alpha.4", | ||
"homepage": "https://tiptap.dev", | ||
@@ -26,3 +27,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "7966af0fec4e65f83d7e5a22ccb9fc420a9a6728" | ||
"gitHead": "a884cb81de8783d0097741c1ddb97a82ea88ae0e" | ||
} |
@@ -1,2 +0,2 @@ | ||
import { Command, Mark } from '@tiptap/core' | ||
import { Command, Mark, mergeAttributes } from '@tiptap/core' | ||
@@ -28,3 +28,3 @@ export interface UnderlineOptions { | ||
renderHTML({ HTMLAttributes }) { | ||
return ['u', HTMLAttributes, 0] | ||
return ['u', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0] | ||
}, | ||
@@ -31,0 +31,0 @@ |
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
20997