diff --git a/package-lock.json b/package-lock.json index df926baf..56482360 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3851,11 +3851,6 @@ } } }, - "classnames": { - "version": "2.2.6", - "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.2.6.tgz", - "integrity": "sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q==" - }, "clean-css": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.3.tgz", diff --git a/package.json b/package.json index 5642a553..0c1a9b7a 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,6 @@ "@angular/platform-browser": "~9.1.3", "@angular/platform-browser-dynamic": "~9.1.3", "@angular/router": "~9.1.3", - "classnames": "^2.2.6", "rxjs": "~6.5.4", "tslib": "^1.10.0", "zone.js": "~0.10.2" diff --git a/src/lib/ngx-editor.component.scss b/src/lib/ngx-editor.component.scss index 33516fd7..9f682180 100644 --- a/src/lib/ngx-editor.component.scss +++ b/src/lib/ngx-editor.component.scss @@ -1,5 +1,3 @@ -@import "prosemirror-view//style/prosemirror.css"; - .ProseMirror { outline: none; } diff --git a/src/lib/plugins/menu/getMenu.ts b/src/lib/plugins/menu/getMenu.ts index 376f7486..94ae1417 100644 --- a/src/lib/plugins/menu/getMenu.ts +++ b/src/lib/plugins/menu/getMenu.ts @@ -1,6 +1,5 @@ import { toggleMark } from 'prosemirror-commands'; import { schema } from 'prosemirror-schema-basic'; -import classNames from 'classnames'; import { getIconSvg } from '../../utils/icons'; import { MENU_ITEM_CLASSNAME } from './constants'; @@ -8,7 +7,10 @@ import { MenuItem, Toolbar } from '../../types'; function getMenuDom(name: string): HTMLElement { const div = document.createElement('div'); - div.className = classNames(MENU_ITEM_CLASSNAME, `${MENU_ITEM_CLASSNAME}__${name}`); + + div.classList.add(MENU_ITEM_CLASSNAME); + div.classList.add(`${MENU_ITEM_CLASSNAME}__${name}`); + div.title = name; div.innerHTML = getIconSvg(name); @@ -18,7 +20,7 @@ function getMenuDom(name: string): HTMLElement { function getSeperatorDom(): HTMLElement { const div = document.createElement('div'); - div.className = classNames(`${MENU_ITEM_CLASSNAME}__Seperator`); + div.className = `${MENU_ITEM_CLASSNAME}__Seperator`; return div; } diff --git a/src/ng-package.json b/src/ng-package.json index 19c5d93f..958457e5 100644 --- a/src/ng-package.json +++ b/src/ng-package.json @@ -9,11 +9,7 @@ "prosemirror-schema-basic": "prosemirrorSchemaBasic", "prosemirror-history": "prosemirrorHistory", "prosemirror-keymap": "prosemirrorKeymap", - "prosemirror-commands": "prosemirrorCommands", - "classnames": "classNames" + "prosemirror-commands": "prosemirrorCommands" } - }, - "whitelistedNonPeerDependencies": [ - "classnames" - ] + } } diff --git a/src/package.json b/src/package.json index 45fea20a..bf513065 100644 --- a/src/package.json +++ b/src/package.json @@ -24,8 +24,5 @@ "prosemirror-state": "^1.3.0", "prosemirror-view": "^1.14.0", "tslib": "^1.10.0" - }, - "dependencies": { - "classnames": "^2.2.6" } }