mirror of https://github.com/fantasticit/think.git
fix jserror
This commit is contained in:
parent
ee98b6f858
commit
4d505de16e
|
@ -61,7 +61,7 @@ define(function (require, exports, module) {
|
||||||
},
|
},
|
||||||
|
|
||||||
setTheme: function (name) {
|
setTheme: function (name) {
|
||||||
if (name && !_themes[name]) throw new Error('Theme ' + name + ' not exists!');
|
if (name && !_themes[name]) return;
|
||||||
var lastTheme = this._theme;
|
var lastTheme = this._theme;
|
||||||
this._theme = name || null;
|
this._theme = name || null;
|
||||||
var container = this.getRenderTarget();
|
var container = this.getRenderTarget();
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { Editor, isNodeSelection, isTextSelection, posToDOMRect } from '@tiptap/core';
|
import { Editor, isNodeSelection, isTextSelection, posToDOMRect } from '@tiptap/core';
|
||||||
import { EditorState, Plugin, PluginKey } from 'prosemirror-state';
|
import { EditorState, Plugin, PluginKey } from 'prosemirror-state';
|
||||||
import { EditorView } from 'prosemirror-view';
|
import { EditorView } from 'prosemirror-view';
|
||||||
import tippy, { Instance, Props } from 'tippy.js';
|
import tippy, { Instance, Props, sticky } from 'tippy.js';
|
||||||
|
|
||||||
export interface BubbleMenuPluginProps {
|
export interface BubbleMenuPluginProps {
|
||||||
pluginKey: PluginKey | string;
|
pluginKey: PluginKey | string;
|
||||||
|
@ -144,6 +144,7 @@ export class BubbleMenuView {
|
||||||
trigger: 'manual',
|
trigger: 'manual',
|
||||||
placement: 'top',
|
placement: 'top',
|
||||||
hideOnClick: 'toggle',
|
hideOnClick: 'toggle',
|
||||||
|
plugins: [sticky],
|
||||||
...Object.assign(
|
...Object.assign(
|
||||||
{
|
{
|
||||||
zIndex: 999,
|
zIndex: 999,
|
||||||
|
|
Loading…
Reference in New Issue