@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.js CHANGED
@@ -7512,12 +7512,7 @@ function FontFamilyDropdown() {
7512
7512
  {
7513
7513
  onSelect: () => {
7514
7514
  if (!editor) return;
7515
- const { from, to } = editor.state.selection;
7516
- if (from === to) {
7517
- editor.chain().focus().unsetFontFamily().run();
7518
- } else {
7519
- editor.chain().focus().unsetMark("textStyle", { extendEmptyMarkRange: true }).run();
7520
- }
7515
+ editor.chain().focus().unsetFontFamily().run();
7521
7516
  setOpen(false);
7522
7517
  },
7523
7518
  className: "font-sans",
@@ -8159,31 +8154,7 @@ function SimpleEditor() {
8159
8154
  import_extensions.Gapcursor,
8160
8155
  import_extension_text_style2.TextStyle,
8161
8156
  FontSizeStepper.configure({ step: 2, min: 8, defaultSize: 16 }),
8162
- import_extension_text_style2.FontFamily.extend({
8163
- addGlobalAttributes() {
8164
- return [
8165
- {
8166
- types: [
8167
- "textStyle"
8168
- ],
8169
- attributes: {
8170
- fontFamily: {
8171
- default: null,
8172
- parseHTML: (element) => element.style.fontFamily?.replace(/['"]+/g, ""),
8173
- renderHTML: (attributes) => {
8174
- if (!attributes.fontFamily) {
8175
- return {};
8176
- }
8177
- return {
8178
- style: `font-family: ${attributes.fontFamily}`
8179
- };
8180
- }
8181
- }
8182
- }
8183
- }
8184
- ];
8185
- }
8186
- }).configure({
8157
+ import_extension_text_style2.FontFamily.configure({
8187
8158
  types: ["textStyle"]
8188
8159
  }),
8189
8160
  import_extension_color.default.configure({ types: ["textStyle"] }),