@tiptap/extension-underline
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-underline@2.0.0-alpha.4...@tiptap/extension-underline@2.0.0-alpha.5) (2020-12-18) | ||
**Note:** Version bump only for package @tiptap/extension-underline | ||
# [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) | ||
@@ -8,0 +16,0 @@ |
@@ -1,26 +0,3 @@ | ||
import { Command, Mark } from '@tiptap/core'; | ||
export interface UnderlineOptions { | ||
HTMLAttributes: { | ||
[key: string]: any; | ||
}; | ||
} | ||
declare const Underline: Mark<UnderlineOptions, { | ||
/** | ||
* Set an underline mark | ||
*/ | ||
setUnderline: () => Command; | ||
/** | ||
* Toggle an underline mark | ||
*/ | ||
toggleUnderline: () => Command; | ||
/** | ||
* Unset an underline mark | ||
*/ | ||
unsetUnderline: () => Command; | ||
}>; | ||
import { Underline } from './underline'; | ||
export * from './underline'; | ||
export default Underline; | ||
declare module '@tiptap/core' { | ||
interface AllExtensions { | ||
Underline: typeof Underline; | ||
} | ||
} |
@@ -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: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()}}})})); | ||
!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-underline"]={},e["@tiptap/core"])}(this,(function(e,t){"use strict";const n=t.Mark.create({name:"underline",defaultOptions:{HTMLAttributes:{}},parseHTML:()=>[{tag:"u"},{style:"text-decoration=underline"}],renderHTML({HTMLAttributes:e}){return["u",t.mergeAttributes(this.options.HTMLAttributes,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()}}});e.Underline=n,e.default=n,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=tiptap-extension-underline.bundle.umd.min.js.map |
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
var core = require('@tiptap/core'); | ||
@@ -52,3 +54,4 @@ | ||
module.exports = Underline; | ||
exports.Underline = Underline; | ||
exports.default = Underline; | ||
//# sourceMappingURL=tiptap-extension-underline.cjs.js.map |
@@ -51,2 +51,3 @@ import { Mark, mergeAttributes } from '@tiptap/core'; | ||
export default Underline; | ||
export { Underline }; | ||
//# sourceMappingURL=tiptap-extension-underline.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-underline'] = 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-underline'] = {}, global.core)); | ||
}(this, (function (exports, core) { 'use strict'; | ||
@@ -54,5 +54,8 @@ const Underline = core.Mark.create({ | ||
return Underline; | ||
exports.Underline = Underline; | ||
exports.default = Underline; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
}))); | ||
//# sourceMappingURL=tiptap-extension-underline.umd.js.map |
{ | ||
"name": "@tiptap/extension-underline", | ||
"description": "underline 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,67 +0,5 @@ | ||
import { Command, Mark, mergeAttributes } from '@tiptap/core' | ||
import { Underline } from './underline' | ||
export interface UnderlineOptions { | ||
HTMLAttributes: { | ||
[key: string]: any | ||
}, | ||
} | ||
export * from './underline' | ||
const Underline = Mark.create({ | ||
name: 'underline', | ||
defaultOptions: <UnderlineOptions>{ | ||
HTMLAttributes: {}, | ||
}, | ||
parseHTML() { | ||
return [ | ||
{ | ||
tag: 'u', | ||
}, | ||
{ | ||
style: 'text-decoration=underline', | ||
}, | ||
] | ||
}, | ||
renderHTML({ HTMLAttributes }) { | ||
return ['u', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0] | ||
}, | ||
addCommands() { | ||
return { | ||
/** | ||
* Set an underline mark | ||
*/ | ||
setUnderline: (): Command => ({ commands }) => { | ||
return commands.setMark('underline') | ||
}, | ||
/** | ||
* Toggle an underline mark | ||
*/ | ||
toggleUnderline: (): Command => ({ commands }) => { | ||
return commands.toggleMark('underline') | ||
}, | ||
/** | ||
* Unset an underline mark | ||
*/ | ||
unsetUnderline: (): Command => ({ commands }) => { | ||
return commands.unsetMark('underline') | ||
}, | ||
} | ||
}, | ||
addKeyboardShortcuts() { | ||
return { | ||
'Mod-u': () => this.editor.commands.toggleUnderline(), | ||
} | ||
}, | ||
}) | ||
export default Underline | ||
declare module '@tiptap/core' { | ||
interface AllExtensions { | ||
Underline: typeof Underline, | ||
} | ||
} |
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
21678
16
251