@progress/kendo-react-editor
Version:
React Editor enables users to create rich text content through a WYSIWYG interface. KendoReact Editor package
43 lines (42 loc) • 1.64 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 * as s from "react";
import { Button as v } from "@progress/kendo-react-buttons";
import { toggleInlineFormat as h, hasMark as k } from "@progress/kendo-editor-common";
import { onDownPreventDefault as F } from "./utils.mjs";
import { registerForLocalization as I, provideLocalizationService as S } from "@progress/kendo-react-intl";
import { messages as T } from "../messages/index.mjs";
var m;
((c) => {
c.createInlineFormatTool = (o) => {
const r = class extends s.Component {
render() {
const { view: t, render: a, ...p } = this.props, e = t && t.state, { mark: d, altMarks: u, altStyle: f } = o, n = { mark: d, altMarks: u, altStyle: f }, g = S(this), l = o.messages.title, i = /* @__PURE__ */ s.createElement(
v,
{
onClick: () => t && h(
n,
e && e.tr.setMeta("commandName", o.commandName)
)(t.state, t.dispatch),
selected: !!e && k(e, n),
togglable: !0,
...F,
title: g.toLanguageString(l, T[l]),
...o.props,
...p
}
);
return a ? a.call(void 0, i, { view: t }) : i;
}
};
return I(r), r;
};
})(m || (m = {}));
export {
m as InlineFormatToolNS
};