ワンクリックで
umbraco-monaco-markdown-editor-action
Implement Monaco markdown editor actions in Umbraco backoffice using official docs
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Implement Monaco markdown editor actions in Umbraco backoffice using official docs
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
Implement UFM (Umbraco Flavored Markdown) components in Umbraco backoffice using official docs
Add a new Umbraco extension project reference to the main Umbraco instance and solution
Understand and use localization in Umbraco backoffice (foundational concept)
Implement property editor UIs in Umbraco backoffice using official docs
Quick setup for Umbraco extension development - creates instance, extension, and registers it
Review checks reference for validating Umbraco backoffice extensions
SOC 職業分類に基づく
| name | umbraco-monaco-markdown-editor-action |
| description | Implement Monaco markdown editor actions in Umbraco backoffice using official docs |
| version | 1.0.0 |
| location | managed |
| allowed-tools | Read, Write, Edit, WebFetch |
Monaco Markdown Editor Actions add custom toolbar buttons and keyboard shortcuts to the Markdown editor in Umbraco. They allow you to extend the editing experience with custom functionality like inserting links, images, or custom markdown syntax. Actions appear in the editor toolbar and can respond to keyboard shortcuts.
Always fetch the latest docs before implementing:
Modals: When opening modal dialogs from actions
umbraco-modalsLocalization: When providing localized labels
umbraco-localizationexport const manifests: Array<UmbExtensionManifest> = [
{
type: 'monacoMarkdownEditorAction',
alias: 'My.MonacoMarkdownEditorAction.Custom',
name: 'Custom Monaco Markdown Editor Action',
api: () => import('./my-markdown-action.js'),
meta: {
label: 'Insert Custom',
icon: 'icon-favorite',
},
},
];
import { monaco } from '@umbraco-cms/backoffice/external/monaco-editor';
import { UmbControllerBase } from '@umbraco-cms/backoffice/class-api';
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
import type { UUIModalSidebarSize } from '@umbraco-cms/backoffice/external/uui';
export class MyMarkdownAction extends UmbControllerBase {
constructor(host: UmbControllerHost) {
super(host);
}
getUnique() {
return 'My.MonacoMarkdownEditorAction.Custom';
}
getLabel() {
return 'Insert Custom';
}
getKeybindings() {
// Ctrl/Cmd + Shift + C
return [monaco.KeyMod.CtrlCmd | monaco.KeyMod.Shift | monaco.KeyCode.KeyC];
}
async execute({ editor, overlaySize }: { editor: any; overlaySize: UUIModalSidebarSize }) {
if (!editor) throw new Error('Editor not found');
const selection = editor.getSelections()[0];
if (!selection) return;
const selectedValue = editor.getValueInRange(selection);
// Insert custom markdown
editor.monacoEditor?.executeEdits('', [
{ range: selection, text: `**${selectedValue || 'custom'}**` },
]);
editor.monacoEditor?.focus();
}
}
export { MyMarkdownAction as api };
import { monaco } from '@umbraco-cms/backoffice/external/monaco-editor';
import { UmbControllerBase } from '@umbraco-cms/backoffice/class-api';
import { UMB_MODAL_MANAGER_CONTEXT } from '@umbraco-cms/backoffice/modal';
export class MyModalMarkdownAction extends UmbControllerBase {
getUnique() {
return 'My.MonacoMarkdownEditorAction.Modal';
}
getLabel() {
return 'Insert with Modal';
}
getKeybindings() {
return [monaco.KeyMod.CtrlCmd | monaco.KeyCode.KeyM];
}
async execute({ editor, overlaySize }) {
const modalManager = await this.getContext(UMB_MODAL_MANAGER_CONTEXT);
if (!modalManager) throw new Error('Modal manager not found');
const selection = editor?.getSelections()[0];
if (!selection) return;
// Open a modal and use the result
const modalContext = modalManager.open(this, MY_CUSTOM_MODAL, {
modal: { size: overlaySize },
});
modalContext?.onSubmit().then((value) => {
if (!value) return;
editor.monacoEditor?.executeEdits('', [
{ range: selection, text: value.text },
]);
});
}
}
export { MyModalMarkdownAction as api };
interface ManifestMonacoMarkdownEditorAction extends ManifestApi<any> {
type: 'monacoMarkdownEditorAction';
meta?: MetaMonacoMarkdownEditorAction;
}
interface MetaMonacoMarkdownEditorAction {
icon?: string | null;
label?: string | null; // Can use localization key like '#buttons_linkInsert'
}
// Single key
monaco.KeyCode.Enter
// Ctrl/Cmd combinations
monaco.KeyMod.CtrlCmd | monaco.KeyCode.KeyK // Ctrl+K or Cmd+K
monaco.KeyMod.CtrlCmd | monaco.KeyMod.Shift | monaco.KeyCode.KeyC // Ctrl+Shift+C
monaco.KeyMod.Alt | monaco.KeyCode.KeyI // Alt+I
That's it! Always fetch fresh docs, keep examples minimal, generate complete working code.