@tiptap/extension-font-family
Advanced tools
Comparing version 2.0.0-beta.21 to 2.0.0-beta.24
@@ -0,3 +1,3 @@ | ||
import '@tiptap/extension-text-style'; | ||
import { Extension } from '@tiptap/core'; | ||
import '@tiptap/extension-text-style'; | ||
export declare type FontFamilyOptions = { | ||
@@ -4,0 +4,0 @@ types: string[]; |
@@ -5,4 +5,4 @@ 'use strict'; | ||
require('@tiptap/extension-text-style'); | ||
var core = require('@tiptap/core'); | ||
require('@tiptap/extension-text-style'); | ||
@@ -23,3 +23,3 @@ const FontFamily = core.Extension.create({ | ||
default: null, | ||
parseHTML: element => element.style.fontFamily.replace(/['"]+/g, ''), | ||
parseHTML: element => { var _a; return (_a = element.style.fontFamily) === null || _a === void 0 ? void 0 : _a.replace(/['"]+/g, ''); }, | ||
renderHTML: attributes => { | ||
@@ -26,0 +26,0 @@ if (!attributes.fontFamily) { |
@@ -0,3 +1,3 @@ | ||
import '@tiptap/extension-text-style'; | ||
import { Extension } from '@tiptap/core'; | ||
import '@tiptap/extension-text-style'; | ||
@@ -18,3 +18,3 @@ const FontFamily = Extension.create({ | ||
default: null, | ||
parseHTML: element => element.style.fontFamily.replace(/['"]+/g, ''), | ||
parseHTML: element => { var _a; return (_a = element.style.fontFamily) === null || _a === void 0 ? void 0 : _a.replace(/['"]+/g, ''); }, | ||
renderHTML: attributes => { | ||
@@ -21,0 +21,0 @@ if (!attributes.fontFamily) { |
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@tiptap/core'), require('@tiptap/extension-text-style')) : | ||
typeof define === 'function' && define.amd ? define(['exports', '@tiptap/core', '@tiptap/extension-text-style'], factory) : | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["@tiptap/extension-font-family"] = {}, global.core)); | ||
})(this, (function (exports, core) { 'use strict'; | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@tiptap/extension-text-style'), require('@tiptap/core')) : | ||
typeof define === 'function' && define.amd ? define(['exports', '@tiptap/extension-text-style', '@tiptap/core'], factory) : | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["@tiptap/extension-font-family"] = {}, null, global.core)); | ||
})(this, (function (exports, extensionTextStyle, core) { 'use strict'; | ||
@@ -21,3 +21,3 @@ const FontFamily = core.Extension.create({ | ||
default: null, | ||
parseHTML: element => element.style.fontFamily.replace(/['"]+/g, ''), | ||
parseHTML: element => { var _a; return (_a = element.style.fontFamily) === null || _a === void 0 ? void 0 : _a.replace(/['"]+/g, ''); }, | ||
renderHTML: attributes => { | ||
@@ -24,0 +24,0 @@ if (!attributes.fontFamily) { |
{ | ||
"name": "@tiptap/extension-font-family", | ||
"description": "font family extension for tiptap", | ||
"version": "2.0.0-beta.21", | ||
"version": "2.0.0-beta.24", | ||
"homepage": "https://tiptap.dev", | ||
@@ -32,3 +32,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "e550d3c69e06a1fb153c3faf17ab78c3081ae61b" | ||
"gitHead": "591c0807a2ab5c34b4b7fe12c12511fe4f493ebd" | ||
} |
@@ -1,4 +0,5 @@ | ||
import { Extension } from '@tiptap/core' | ||
import '@tiptap/extension-text-style' | ||
import { Extension } from '@tiptap/core' | ||
export type FontFamilyOptions = { | ||
@@ -39,3 +40,3 @@ types: string[], | ||
default: null, | ||
parseHTML: element => element.style.fontFamily.replace(/['"]+/g, ''), | ||
parseHTML: element => element.style.fontFamily?.replace(/['"]+/g, ''), | ||
renderHTML: attributes => { | ||
@@ -42,0 +43,0 @@ if (!attributes.fontFamily) { |
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
19600