@progress/kendo-vue-editor
Version:
65 lines (64 loc) • 1.63 kB
JavaScript
/**
* @license
*-------------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the package root for more information
*-------------------------------------------------------------------------------------------
*/
import { Button as s } from "@progress/kendo-vue-buttons";
import { removeLink as c, hasMark as p } from "@progress/kendo-editor-common";
import { provideLocalizationService as l } from "@progress/kendo-vue-intl";
import { messages as d } from "../messages/main.mjs";
import { defineComponent as k, h } from "vue";
const C = /* @__PURE__ */ k({
name: "KendoUnlink",
props: {
view: Object,
settings: {
type: Object,
default: function() {
return {
messages: {}
};
}
},
...s.props
},
inject: {
kendoLocalizationService: {
default: null
}
},
render() {
const {
view: t,
settings: e,
...o
} = this.$props, i = {
mark: e.mark
}, r = t ? p(t.state, i) : !1, a = l(this), n = e.messages.title, m = {
...o,
disabled: !r,
title: a.toLanguageString(n, d[n]),
...e.props
};
return h(s, {
onClick: this.handleClick,
...m
});
},
methods: {
handleClick() {
const {
view: t,
settings: e
} = this.$props, o = {
mark: e.mark
};
t && c(o, t.state.tr.setMeta("commandName", e.commandName))(t.state, t.dispatch);
}
}
});
export {
C as Unlink
};