jodit
Version:
Jodit is awesome and usefully wysiwyg editor with filebrowser
31 lines (27 loc) • 682 B
text/typescript
/*!
* Jodit Editor (https://xdsoft.net/jodit/)
* Released under MIT see LICENSE.txt in the project root for license information.
* Copyright (c) 2013-2020 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
*/
import { IControlType, IJodit } from '../../../../types';
import { attr } from '../../../../core/helpers/utils';
export default [
{
name: 'eye',
tooltip: 'Open link',
exec: (editor: IJodit, current) => {
const href = attr(current as HTMLElement, 'href');
if (current && href) {
editor.ow.open(href);
}
}
},
{
name: 'link',
tooltip: 'Edit link',
icon: 'pencil'
},
'unlink',
'brush',
'file'
] as Array<IControlType | string>;