@mhamz.01/easyflow-texteditor 0.1.94 → 0.1.95

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -7486,12 +7486,7 @@ function FontFamilyDropdown() {
7486
7486
  {
7487
7487
  onSelect: () => {
7488
7488
  if (!editor) return;
7489
- const { from, to } = editor.state.selection;
7490
- if (from === to) {
7491
- editor.chain().focus().unsetFontFamily().run();
7492
- } else {
7493
- editor.chain().focus().unsetMark("textStyle", { extendEmptyMarkRange: true }).run();
7494
- }
7489
+ editor.chain().focus().unsetFontFamily().run();
7495
7490
  setOpen(false);
7496
7491
  },
7497
7492
  className: "font-sans",
@@ -8133,31 +8128,7 @@ function SimpleEditor() {
8133
8128
  Gapcursor,
8134
8129
  TextStyle,
8135
8130
  FontSizeStepper.configure({ step: 2, min: 8, defaultSize: 16 }),
8136
- FontFamily.extend({
8137
- addGlobalAttributes() {
8138
- return [
8139
- {
8140
- types: [
8141
- "textStyle"
8142
- ],
8143
- attributes: {
8144
- fontFamily: {
8145
- default: null,
8146
- parseHTML: (element) => element.style.fontFamily?.replace(/['"]+/g, ""),
8147
- renderHTML: (attributes) => {
8148
- if (!attributes.fontFamily) {
8149
- return {};
8150
- }
8151
- return {
8152
- style: `font-family: ${attributes.fontFamily}`
8153
- };
8154
- }
8155
- }
8156
- }
8157
- }
8158
- ];
8159
- }
8160
- }).configure({
8131
+ FontFamily.configure({
8161
8132
  types: ["textStyle"]
8162
8133
  }),
8163
8134
  Color.configure({ types: ["textStyle"] }),