UNPKG

@edifice.io/tiptap-extensions

Version:
3 lines (2 loc) 617 B
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("@tiptap/extension-text-style");const core=require("@tiptap/core"),LineHeight=core.Extension.create({name:"lineHeight",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{lineHeight:{default:null,parseHTML:element=>{var _a;return(_a=element.style.lineHeight)==null?void 0:_a.replace(/['"]+/g,"")},renderHTML:attributes=>attributes.lineHeight?{style:`line-height: ${attributes.lineHeight}`}:{}}}}]}});exports.LineHeight=LineHeight; //# sourceMappingURL=line-height.cjs.map