{"_id":"@apostrophecms/font-size","_rev":"2-6e856792957915946e216c5fef946ea0","name":"@apostrophecms/font-size","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0-beta.1":{"name":"@apostrophecms/font-size","version":"1.0.0-beta.1","keywords":["apostrophecms","apostrophe","rich-text","tiptap","font-size"],"author":{"name":"Apostrophe Technologies"},"license":"MIT","_id":"@apostrophecms/font-size@1.0.0-beta.1","maintainers":[{"name":"alexgilbert","email":"alex@apostrophecms.com"},{"name":"boutell","email":"tom@apostrophecms.com"},{"name":"romanek","email":"stuart+npm@apostrophecms.com"},{"name":"bodonkey","email":"robert.means1969+apostrophecms@gmail.com"}],"homepage":"https://github.com/apostrophecms/apostrophe/tree/main/packages/font-size#readme","bugs":{"url":"https://github.com/apostrophecms/apostrophe/issues"},"dist":{"shasum":"932b40c5cb806a163e6d931c708fc7dbd53f68e2","tarball":"https://registry.npmjs.org/@apostrophecms/font-size/-/font-size-1.0.0-beta.1.tgz","fileCount":17,"integrity":"sha512-Slmurgs8Zl0gsqB10/jtsUI3xDtdcydJO97fSFmYL+b8g7mN7MOf2P2HHCUW2R3Jamx19bnwJDiNND36OGeeVg==","signatures":[{"sig":"MEUCIE5SnfOs+em7ltxR1mD4pOZjluR7DCkekH7nJoq01uDzAiEAj5WrCTCOW0FxQrmX1ApSe4ESoYwZHZO+3CP1Vxmf1Ts=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":26911},"main":"index.js","_from":"file:apostrophecms-font-size-1.0.0-beta.1.tgz","scripts":{"lint":"npm run eslint && npm run stylelint","test":"npm run lint && mocha","mocha":"mocha","eslint":"eslint .","stylelint":"stylelint ui/**/*.{scss,vue}"},"_npmUser":{"name":"boutell","email":"tom@apostrophecms.com"},"_resolved":"/private/var/folders/lg/7k83x5ys71d90nvc40mj1tbr0000gn/T/faf995f11275f45ba578e907cb57d5ca/apostrophecms-font-size-1.0.0-beta.1.tgz","_integrity":"sha512-Slmurgs8Zl0gsqB10/jtsUI3xDtdcydJO97fSFmYL+b8g7mN7MOf2P2HHCUW2R3Jamx19bnwJDiNND36OGeeVg==","repository":{"url":"git+https://github.com/apostrophecms/apostrophe.git","type":"git","directory":"packages/font-size"},"_npmVersion":"11.12.0","description":"Adds a free-form font size tool to the ApostropheCMS rich text editor.","directories":{},"_nodeVersion":"23.10.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"mocha":"^11.7.5","eslint":"^9.39.1","stylelint":"^16.0.0","apostrophe":"^4.31.0","eslint-config-apostrophe":"^6.0.2","stylelint-config-apostrophe":"^4.4.0"},"peerDependencies":{"@tiptap/core":"^2.4.0"},"_npmOperationalInternal":{"tmp":"tmp/font-size_1.0.0-beta.1_1782826061446_0.5856464799676786","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"name":"@apostrophecms/font-size","version":"1.0.0","description":"Adds a free-form font size tool to the ApostropheCMS rich text editor.","main":"index.js","repository":{"type":"git","url":"git+https://github.com/apostrophecms/apostrophe.git","directory":"packages/font-size"},"homepage":"https://github.com/apostrophecms/apostrophe/tree/main/packages/font-size#readme","keywords":["apostrophecms","apostrophe","rich-text","tiptap","font-size"],"author":{"name":"Apostrophe Technologies"},"license":"MIT","peerDependencies":{"@tiptap/core":"^2.4.0"},"devDependencies":{"eslint":"^9.39.1","mocha":"^11.7.5","stylelint":"^16.0.0","apostrophe":"^4.31.0","stylelint-config-apostrophe":"^4.4.0","eslint-config-apostrophe":"^6.0.2"},"publishConfig":{"access":"public"},"scripts":{"lint":"npm run eslint && npm run stylelint","eslint":"eslint .","stylelint":"stylelint ui/**/*.{scss,vue}","mocha":"mocha","test":"npm run lint && mocha"},"_id":"@apostrophecms/font-size@1.0.0","bugs":{"url":"https://github.com/apostrophecms/apostrophe/issues"},"_integrity":"sha512-kumzLcTCyNnjQYGLYyjFC13ThAzTVeJv8vtBWQTfhEtLTXQCUeC8biUB558vaAC99CABEJ9JXtn15GGxvLdEtg==","_resolved":"/private/var/folders/lg/7k83x5ys71d90nvc40mj1tbr0000gn/T/771f8c3a144385c58850021773399126/apostrophecms-font-size-1.0.0.tgz","_from":"file:apostrophecms-font-size-1.0.0.tgz","_nodeVersion":"24.18.0","_npmVersion":"11.16.0","dist":{"integrity":"sha512-kumzLcTCyNnjQYGLYyjFC13ThAzTVeJv8vtBWQTfhEtLTXQCUeC8biUB558vaAC99CABEJ9JXtn15GGxvLdEtg==","shasum":"66e327232a878dbe47fe3d70070fbc3d7b853002","tarball":"https://registry.npmjs.org/@apostrophecms/font-size/-/font-size-1.0.0.tgz","fileCount":16,"unpackedSize":26839,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIBn5/gm8YOFiSWESWMLTa8q7Ko8ywGOk4JPHCfx4lkSXAiBH7wn1ij12WB0esVRvTmZ99QbrfQPLhfFJG5lIdF00MA=="}]},"_npmUser":{"name":"boutell","email":"tom@apostrophecms.com"},"directories":{},"maintainers":[{"name":"alexgilbert","email":"alex@apostrophecms.com"},{"name":"boutell","email":"tom@apostrophecms.com"},{"name":"romanek","email":"stuart+npm@apostrophecms.com"},{"name":"bodonkey","email":"robert.means1969+apostrophecms@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/font-size_1.0.0_1783706664254_0.40383275283747344"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-30T13:27:41.207Z","modified":"2026-07-10T18:04:24.726Z","1.0.0-beta.1":"2026-06-30T13:27:41.610Z","1.0.0":"2026-07-10T18:04:24.544Z"},"bugs":{"url":"https://github.com/apostrophecms/apostrophe/issues"},"author":{"name":"Apostrophe Technologies"},"license":"MIT","homepage":"https://github.com/apostrophecms/apostrophe/tree/main/packages/font-size#readme","keywords":["apostrophecms","apostrophe","rich-text","tiptap","font-size"],"repository":{"type":"git","url":"git+https://github.com/apostrophecms/apostrophe.git","directory":"packages/font-size"},"description":"Adds a free-form font size tool to the ApostropheCMS rich text editor.","maintainers":[{"name":"alexgilbert","email":"alex@apostrophecms.com"},{"name":"boutell","email":"tom@apostrophecms.com"},{"name":"romanek","email":"stuart+npm@apostrophecms.com"},{"name":"bodonkey","email":"robert.means1969+apostrophecms@gmail.com"}],"readme":"# @apostrophecms/font-size\n\n![Screenshot](https://static.apostrophecms.com/apostrophecms/font-size/images/font-size.png)\n\nAdds a free-form **font size** tool to the ApostropheCMS rich text editor\ntoolbar. Editors select text and set its size in pixels, either by typing a\nvalue or picking a preset. The size is stored as inline `font-size` styling on\na `<span>`, the same way the core color tool stores its value.\n\nThis feature is intentionally shipped as a separate, installable module rather\nthan in Apostrophe core, so it is only present in the projects that want it.\n\n## When to use this module\n\nIf SEO is your primary concern, offer various heading levels instead, optionally with multiple CSS classes for each level and even the paragraph element itself. This yields the best SEO outcome because Google is looking for semantic markup, not explicit font sizes.\n\nHowever, if you and your customers need the flexibility to match exact font sizes or change the font size in mid-line, this module is right for you.\n\n## Installation\n\n```bash\nnpm install @apostrophecms/font-size\n```\n\nThen enable it in `app.js`:\n\n```javascript\nrequire('apostrophe')({\n  shortName: 'my-project',\n  modules: {\n    '@apostrophecms/font-size': {}\n  }\n});\n```\n\nThe module *improves* `@apostrophecms/rich-text-widget`, so there is nothing\nelse to wire up.\n\nIf you are not explicitly configuring the toolbars of your rich text widgets... that's it! The feature is available by default. If you are configuring each rich text widget toolbar explicitly, read on.\n\n## Options\n\nThis module **improves** `@apostrophecms/rich-text-widget`. An Apostrophe\nimprovement has no separate existence — it merges into the module it improves —\nso it cannot be configured under its own name. **Set these options on\n`@apostrophecms/rich-text-widget`, not on `@apostrophecms/font-size`:**\n\n```javascript\nmodules: {\n  '@apostrophecms/font-size': {},\n  // Configure the rich-text-widget module, NOT\n  // the font-size module\n  '@apostrophecms/rich-text-widget': {\n    options: {\n      fontSizes: [ 14, 16, 20, 28, 40 ],\n      addFontSizeToDefaultToolbar: false\n    }\n  }\n}\n```\n\n| Option | Default | Description |\n| --- | --- | --- |\n| `fontSizes` | `[ 12, 14, 16, 18, 24, 32, 48 ]` | Preset pixel sizes offered as quick choices. The numeric input remains free-form. Set to `[]` for free-form only. |\n| `addFontSizeToDefaultToolbar` | `true` | Whether to add `size` to the rich text default toolbar. Set to `false` to make the tool available but opt in per area via the `toolbar` option. |\n\nTo offer the tool only in specific widgets, set `addFontSizeToDefaultToolbar: false`\nand add `'size'` to each widget's `toolbar` array.\n\n## How it works\n\n- A tiptap extension (`ui/apos/tiptap-extensions/FontSize.js`) adds a `fontSize`\n  attribute to the shared `textStyle` mark and provides `setFontSize` /\n  `unsetFontSize` commands.\n- A Vue toolbar component (`ui/apos/components/AposTiptapFontSize.vue`) provides\n  the popover with the numeric input and presets.\n- The module extends the widget's `sanitize-html` allowlists so that\n  `<span style=\"font-size: ...px\">` survives sanitization — only pixel values\n  are permitted, and only where the `size` tool is enabled.\n","readmeFilename":"README.md"}