fix jserror

pull/243/head
fantasticit 2023-04-09 12:15:41 +08:00
parent ee98b6f858
commit 4d505de16e
2 changed files with 3 additions and 2 deletions

View File

@ -61,7 +61,7 @@ define(function (require, exports, module) {
},
setTheme: function (name) {
if (name && !_themes[name]) throw new Error('Theme ' + name + ' not exists!');
if (name && !_themes[name]) return;
var lastTheme = this._theme;
this._theme = name || null;
var container = this.getRenderTarget();

View File

@ -1,7 +1,7 @@
import { Editor, isNodeSelection, isTextSelection, posToDOMRect } from '@tiptap/core';
import { EditorState, Plugin, PluginKey } from 'prosemirror-state';
import { EditorView } from 'prosemirror-view';
import tippy, { Instance, Props } from 'tippy.js';
import tippy, { Instance, Props, sticky } from 'tippy.js';
export interface BubbleMenuPluginProps {
pluginKey: PluginKey | string;
@ -144,6 +144,7 @@ export class BubbleMenuView {
trigger: 'manual',
placement: 'top',
hideOnClick: 'toggle',
plugins: [sticky],
...Object.assign(
{
zIndex: 999,