├── .nvmrc ├── .husky └── pre-commit ├── .npmrc ├── .eslintignore ├── .gitignore ├── .wordpress-org ├── banner-772x250.png ├── icon-128x128.png ├── icon-256x256.png ├── screenshot-1.png ├── screenshot-2.png ├── screenshot-3.gif ├── screenshot-4.png ├── screenshot-5.png ├── banner-1544x500.png └── blueprints │ └── blueprint.json ├── assets ├── fonts │ ├── FiraCode-Bold.woff2 │ ├── FiraCode-Light.woff2 │ ├── UbuntuMono-lt.woff2 │ ├── AnonymousPro-lt.woff2 │ ├── FiraCode-Medium.woff2 │ ├── FiraCode-Regular.woff2 │ ├── SourceCodePro-It.woff2 │ ├── UbuntuMono-Bold.woff2 │ ├── AnonymousPro-Bold.woff2 │ ├── AnonymousPro-Boldlt.woff2 │ ├── FiraCode-SemiBold.woff2 │ ├── SourceCodePro-Black.woff2 │ ├── SourceCodePro-Bold.woff2 │ ├── SourceCodePro-Light.woff2 │ ├── UbuntuMono-Boldlt.woff2 │ ├── UbuntuMono-Regular.woff2 │ ├── AnonymousPro-Regular.woff2 │ ├── SourceCodePro-BlackIt.woff2 │ ├── SourceCodePro-BoldIt.woff2 │ ├── SourceCodePro-LightIt.woff2 │ ├── SourceCodePro-Medium.woff2 │ ├── SourceCodePro-Regular.woff2 │ ├── SourceCodePro-ExtraLight.woff2 │ ├── SourceCodePro-MediumIt.woff2 │ ├── SourceCodePro-Semibold.woff2 │ ├── SourceCodePro-SemiboldIt.woff2 │ └── SourceCodePro-ExtraLightIt.woff2 ├── images │ └── admin │ │ ├── welcome-guide │ │ ├── slide_1.gif │ │ ├── slide_2.gif │ │ ├── slide_3.gif │ │ ├── slide_4.jpg │ │ └── slide_5.jpg │ │ └── editor-config │ │ ├── editor-options │ │ ├── hover.gif │ │ ├── folding.gif │ │ ├── links_1.jpg │ │ ├── links_2.jpg │ │ ├── rulers.gif │ │ ├── find │ │ │ ├── loop.gif │ │ │ ├── addextra-space-on-top_1.jpg │ │ │ ├── addextra-space-on-top_2.jpg │ │ │ └── seed-search-string-from-selection.gif │ │ ├── padding │ │ │ ├── top.gif │ │ │ └── bottom.gif │ │ ├── word-wrap_1.jpg │ │ ├── word-wrap_2.jpg │ │ ├── word-wrap_3.jpg │ │ ├── word-wrap_4.jpg │ │ ├── auto-indent_1.gif │ │ ├── auto-indent_2.gif │ │ ├── auto-indent_3.gif │ │ ├── auto-surround_1.gif │ │ ├── auto-surround_2.gif │ │ ├── auto-surround_3.gif │ │ ├── auto-surround_4.gif │ │ ├── contextmenu_1.jpg │ │ ├── contextmenu_2.jpg │ │ ├── cursor-style_1.jpg │ │ ├── cursor-style_2.jpg │ │ ├── cursor-style_3.jpg │ │ ├── cursor-style_4.jpg │ │ ├── cursor-style_5.jpg │ │ ├── cursor-style_6.jpg │ │ ├── drag-and-drop.gif │ │ ├── glyph-margin_1.jpg │ │ ├── glyph-margin_2.jpg │ │ ├── line-numbers_1.jpg │ │ ├── line-numbers_2.jpg │ │ ├── line-numbers_3.gif │ │ ├── line-numbers_4.gif │ │ ├── minimap │ │ │ ├── enabled.gif │ │ │ ├── scale.gif │ │ │ ├── side_1.jpg │ │ │ ├── side_2.jpg │ │ │ ├── size_1.jpg │ │ │ ├── size_2.jpg │ │ │ ├── size_3.jpg │ │ │ ├── max-column.gif │ │ │ ├── show-slider_1.jpg │ │ │ ├── show-slider_2.gif │ │ │ ├── render-characters_1.jpg │ │ │ └── render-characters_2.jpg │ │ ├── use-tab-stops_1.gif │ │ ├── use-tab-stops_2.gif │ │ ├── column-selection.gif │ │ ├── cursor-blinking_1.gif │ │ ├── cursor-blinking_2.gif │ │ ├── cursor-blinking_3.gif │ │ ├── cursor-blinking_4.gif │ │ ├── cursor-blinking_5.jpg │ │ ├── font-ligatures_1.jpg │ │ ├── font-ligatures_2.jpg │ │ ├── format-on-paste_1.gif │ │ ├── format-on-paste_2.gif │ │ ├── match-brackets_1.gif │ │ ├── match-brackets_2.gif │ │ ├── match-brackets_3.gif │ │ ├── mouse-wheel-zoom.gif │ │ ├── quick-suggestions.gif │ │ ├── word-wrap-column.gif │ │ ├── wrapping-indent_1.jpg │ │ ├── wrapping-indent_2.jpg │ │ ├── wrapping-indent_3.jpg │ │ ├── wrapping-indent_4.jpg │ │ ├── folding-highlight_1.jpg │ │ ├── folding-highlight_2.jpg │ │ ├── folding-strategy_1.gif │ │ ├── folding-strategy_2.gif │ │ ├── multi-cursor-paste_1.gif │ │ ├── multi-cursor-paste_2.gif │ │ ├── render-whitespace_1.jpg │ │ ├── render-whitespace_2.jpg │ │ ├── render-whitespace_3.jpg │ │ ├── render-whitespace_4.jpg │ │ ├── render-whitespace_5.jpg │ │ ├── rounded-selection_1.jpg │ │ ├── rounded-selection_2.jpg │ │ ├── scrollbar │ │ │ ├── vertical_1.gif │ │ │ ├── vertical_2.jpg │ │ │ ├── vertical_3.jpg │ │ │ ├── arrow-size_1.jpg │ │ │ ├── arrow-size_2.jpg │ │ │ ├── horizontal_1.gif │ │ │ ├── horizontal_2.jpg │ │ │ ├── horizontal_3.jpg │ │ │ ├── scroll-by-page.gif │ │ │ ├── use-shadows_1.jpg │ │ │ ├── use-shadows_2.jpg │ │ │ ├── vertical-has-arrows_1.jpg │ │ │ ├── vertical-has-arrows_2.jpg │ │ │ ├── horizontal-has-arrows_1.jpg │ │ │ ├── horizontal-has-arrows_2.jpg │ │ │ ├── vertical-scrollbar-size_1.jpg │ │ │ ├── vertical-scrollbar-size_2.jpg │ │ │ ├── horizontal-scrollbar-size_1.jpg │ │ │ ├── horizontal-scrollbar-size_2.jpg │ │ │ ├── always-consume-mouse-wheel_1.gif │ │ │ └── always-consume-mouse-wheel_2.gif │ │ ├── smooth-scrolling_1.gif │ │ ├── smooth-scrolling_2.gif │ │ ├── sticky-tab-stops_1.gif │ │ ├── sticky-tab-stops_2.gif │ │ ├── suggest-font-size_1.jpg │ │ ├── suggest-font-size_2.jpg │ │ ├── suggest │ │ │ ├── show-icons_1.jpg │ │ │ └── show-icons_2.jpg │ │ ├── auto-closing-quotes_1.gif │ │ ├── auto-closing-quotes_2.gif │ │ ├── auto-closing-quotes_3.gif │ │ ├── line-decorations-width.gif │ │ ├── line-numbers-min-chars.gif │ │ ├── multi-cursor-modifier.gif │ │ ├── render-final-newline_1.jpg │ │ ├── render-final-newline_2.jpg │ │ ├── render-indent-guides_1.jpg │ │ ├── render-indent-guides_2.jpg │ │ ├── selection-highlight_1.jpg │ │ ├── selection-highlight_2.jpg │ │ ├── suggest-line-height_1.jpg │ │ ├── suggest-line-height_2.jpg │ │ ├── auto-closing-brackets_1.gif │ │ ├── auto-closing-brackets_2.gif │ │ ├── auto-closing-brackets_3.gif │ │ ├── comments_insert-space_1.jpg │ │ ├── comments_insert-space_2.jpg │ │ ├── empty-selection-clipboard.gif │ │ ├── occurrences-highlight_1.jpg │ │ ├── occurrences-highlight_2.jpg │ │ ├── overview-ruler-border_1.jpg │ │ ├── overview-ruler-border_2.jpg │ │ ├── quick-suggestions-delay_1.gif │ │ ├── quick-suggestions-delay_2.gif │ │ ├── render-line-highlight_1.jpg │ │ ├── render-line-highlight_2.jpg │ │ ├── render-line-highlight_3.jpg │ │ ├── render-line-highlight_4.jpg │ │ ├── scroll-beyond-last-line_1.gif │ │ ├── scroll-beyond-last-line_2.gif │ │ ├── select-on-line-numbers_1.gif │ │ ├── select-on-line-numbers_2.gif │ │ ├── show-folding-controls_1.jpg │ │ ├── show-folding-controls_2.gif │ │ ├── cursor-surrounding-lines_1.gif │ │ ├── cursor-surrounding-lines_2.gif │ │ ├── render-control-characters_1.jpg │ │ ├── render-control-characters_2.jpg │ │ ├── scroll-beyond-last-column_1.gif │ │ ├── scroll-beyond-last-column_2.gif │ │ ├── copy-with-syntax-highlighting_1.jpg │ │ ├── copy-with-syntax-highlighting_2.jpg │ │ ├── cursor-smooth-caret-animation_1.gif │ │ ├── cursor-smooth-caret-animation_2.gif │ │ ├── cursor-surrounding-lines-style_1.gif │ │ ├── cursor-surrounding-lines-style_2.gif │ │ ├── hide-cursor-in-overview-ruler_1.jpg │ │ ├── hide-cursor-in-overview-ruler_2.jpg │ │ ├── highlight-active-indent-guide_1.gif │ │ ├── highlight-active-indent-guide_2.gif │ │ ├── unfold-on-click-after-end-of-line.gif │ │ ├── render-line-highlight-only-when-focus_1.gif │ │ └── render-line-highlight-only-when-focus_2.gif │ │ └── editor-settings │ │ └── emmet.gif ├── css │ ├── ubuntu-mono.css │ ├── anonymous-pro.css │ ├── ubuntu-mono-italic.css │ ├── anonymous-pro-italic.css │ ├── fira-code.css │ ├── source-code-pro.css │ └── source-code-pro-italic.css └── js │ └── pointer.js ├── src ├── admin │ ├── components │ │ ├── shortcut │ │ │ └── style.scss │ │ ├── welcome-guide │ │ │ └── style.scss │ │ ├── snackbars │ │ │ ├── style.scss │ │ │ └── index.js │ │ └── header │ │ │ ├── style.scss │ │ │ └── index.js │ ├── editor-config │ │ ├── components │ │ │ ├── editor-preview │ │ │ │ ├── style.scss │ │ │ │ └── index.js │ │ │ ├── filter │ │ │ │ └── style.scss │ │ │ ├── item-help │ │ │ │ └── style.scss │ │ │ └── controls │ │ │ │ └── index.js │ │ ├── editor-settings │ │ │ ├── index.js │ │ │ ├── tab-size.js │ │ │ ├── theme.js │ │ │ └── insert-spaces.js │ │ ├── style.scss │ │ └── editor-options │ │ │ ├── font-size.js │ │ │ ├── cursor-width.js │ │ │ ├── line-height.js │ │ │ ├── letter-spacing.js │ │ │ ├── mouse-wheel-scroll-sensitivity.js │ │ │ ├── font-weight.js │ │ │ ├── fast-scroll-sensitivity.js │ │ │ ├── hover.js │ │ │ ├── drag-and-drop.js │ │ │ ├── mouse-wheel-zoom.js │ │ │ ├── line-numbers-min-chars.js │ │ │ ├── rulers.js │ │ │ ├── empty-selection-clipboard.js │ │ │ ├── minimap │ │ │ ├── max-column.js │ │ │ ├── scale.js │ │ │ └── enabled.js │ │ │ ├── word-wrap-column.js │ │ │ ├── line-decorations-width.js │ │ │ ├── unfold-on-click-after-end-of-line.js │ │ │ ├── find │ │ │ ├── loop.js │ │ │ ├── seed-search-string-from-selection.js │ │ │ └── addextra-space-on-top.js │ │ │ ├── quick-suggestions.js │ │ │ ├── padding │ │ │ ├── top.js │ │ │ └── bottom.js │ │ │ ├── links.js │ │ │ ├── scrollbar │ │ │ ├── scroll-by-page.js │ │ │ └── use-shadows.js │ │ │ ├── accept-suggestion-on-enter.js │ │ │ ├── folding.js │ │ │ ├── format-on-paste.js │ │ │ ├── smooth-scrolling.js │ │ │ ├── rounded-selection.js │ │ │ ├── folding-highlight.js │ │ │ ├── sticky-tab-stops.js │ │ │ ├── render-indent-guides.js │ │ │ ├── use-tab-stops.js │ │ │ ├── overview-ruler-border.js │ │ │ ├── occurrences-highlight.js │ │ │ ├── scroll-beyond-last-line.js │ │ │ ├── selection-highlight.js │ │ │ ├── suggest │ │ │ └── show-icons.js │ │ │ ├── render-control-characters.js │ │ │ ├── render-final-newline.js │ │ │ ├── cursor-smooth-caret-animation.js │ │ │ ├── hide-cursor-in-overview-ruler.js │ │ │ ├── highlight-active-indent-guide.js │ │ │ ├── select-on-line-numbers.js │ │ │ ├── glyph-margin.js │ │ │ ├── render-line-highlight-only-when-focus.js │ │ │ └── show-folding-controls.js │ ├── tools │ │ └── index.js │ ├── options │ │ ├── components │ │ │ ├── permission-user-role │ │ │ │ └── index.js │ │ │ └── permission-editor │ │ │ │ └── index.js │ │ └── index.js │ └── style.scss ├── lib │ ├── helper.js │ └── themes │ │ ├── spacecadet.json │ │ ├── idle.json │ │ ├── themelist.json │ │ ├── slush-and-poppies.json │ │ └── all-hallows-eve.json ├── theme-plugin-editor │ └── style.scss ├── components │ ├── block-icon.js │ └── monaco-editor │ │ └── style.scss └── block-editor │ ├── index.js │ └── style.scss ├── playwright.config.js ├── .prettierrc.js ├── .editorconfig ├── .distignore ├── .wp-env.json ├── webpack.config.js ├── .stylelintrc.js ├── phpcs.ruleset.xml ├── composer.json ├── bin └── delete-sourcemaps.js ├── custom-html-block-extension.php ├── .eslintrc.js └── classes └── class-init.php /.nvmrc: -------------------------------------------------------------------------------- 1 | 22 2 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | lint-staged 2 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | save-exact = true 2 | engine-strict = true 3 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | vendor/ 3 | build/ 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .vscode 2 | artifacts/ 3 | build/ 4 | node_modules/ 5 | vendor/ 6 | .wp-env.override.json 7 | -------------------------------------------------------------------------------- /.wordpress-org/banner-772x250.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/.wordpress-org/banner-772x250.png -------------------------------------------------------------------------------- /.wordpress-org/icon-128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/.wordpress-org/icon-128x128.png -------------------------------------------------------------------------------- /.wordpress-org/icon-256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/.wordpress-org/icon-256x256.png -------------------------------------------------------------------------------- /.wordpress-org/screenshot-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/.wordpress-org/screenshot-1.png -------------------------------------------------------------------------------- /.wordpress-org/screenshot-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/.wordpress-org/screenshot-2.png -------------------------------------------------------------------------------- /.wordpress-org/screenshot-3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/.wordpress-org/screenshot-3.gif -------------------------------------------------------------------------------- /.wordpress-org/screenshot-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/.wordpress-org/screenshot-4.png -------------------------------------------------------------------------------- /.wordpress-org/screenshot-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/.wordpress-org/screenshot-5.png -------------------------------------------------------------------------------- /assets/fonts/FiraCode-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/fonts/FiraCode-Bold.woff2 -------------------------------------------------------------------------------- /assets/fonts/FiraCode-Light.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/fonts/FiraCode-Light.woff2 -------------------------------------------------------------------------------- /assets/fonts/UbuntuMono-lt.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/fonts/UbuntuMono-lt.woff2 -------------------------------------------------------------------------------- /.wordpress-org/banner-1544x500.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/.wordpress-org/banner-1544x500.png -------------------------------------------------------------------------------- /assets/fonts/AnonymousPro-lt.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/fonts/AnonymousPro-lt.woff2 -------------------------------------------------------------------------------- /assets/fonts/FiraCode-Medium.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/fonts/FiraCode-Medium.woff2 -------------------------------------------------------------------------------- /assets/fonts/FiraCode-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/fonts/FiraCode-Regular.woff2 -------------------------------------------------------------------------------- /assets/fonts/SourceCodePro-It.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/fonts/SourceCodePro-It.woff2 -------------------------------------------------------------------------------- /assets/fonts/UbuntuMono-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/fonts/UbuntuMono-Bold.woff2 -------------------------------------------------------------------------------- /assets/fonts/AnonymousPro-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/fonts/AnonymousPro-Bold.woff2 -------------------------------------------------------------------------------- /assets/fonts/AnonymousPro-Boldlt.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/fonts/AnonymousPro-Boldlt.woff2 -------------------------------------------------------------------------------- /assets/fonts/FiraCode-SemiBold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/fonts/FiraCode-SemiBold.woff2 -------------------------------------------------------------------------------- /assets/fonts/SourceCodePro-Black.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/fonts/SourceCodePro-Black.woff2 -------------------------------------------------------------------------------- /assets/fonts/SourceCodePro-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/fonts/SourceCodePro-Bold.woff2 -------------------------------------------------------------------------------- /assets/fonts/SourceCodePro-Light.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/fonts/SourceCodePro-Light.woff2 -------------------------------------------------------------------------------- /assets/fonts/UbuntuMono-Boldlt.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/fonts/UbuntuMono-Boldlt.woff2 -------------------------------------------------------------------------------- /assets/fonts/UbuntuMono-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/fonts/UbuntuMono-Regular.woff2 -------------------------------------------------------------------------------- /assets/fonts/AnonymousPro-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/fonts/AnonymousPro-Regular.woff2 -------------------------------------------------------------------------------- /assets/fonts/SourceCodePro-BlackIt.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/fonts/SourceCodePro-BlackIt.woff2 -------------------------------------------------------------------------------- /assets/fonts/SourceCodePro-BoldIt.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/fonts/SourceCodePro-BoldIt.woff2 -------------------------------------------------------------------------------- /assets/fonts/SourceCodePro-LightIt.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/fonts/SourceCodePro-LightIt.woff2 -------------------------------------------------------------------------------- /assets/fonts/SourceCodePro-Medium.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/fonts/SourceCodePro-Medium.woff2 -------------------------------------------------------------------------------- /assets/fonts/SourceCodePro-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/fonts/SourceCodePro-Regular.woff2 -------------------------------------------------------------------------------- /assets/fonts/SourceCodePro-ExtraLight.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/fonts/SourceCodePro-ExtraLight.woff2 -------------------------------------------------------------------------------- /assets/fonts/SourceCodePro-MediumIt.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/fonts/SourceCodePro-MediumIt.woff2 -------------------------------------------------------------------------------- /assets/fonts/SourceCodePro-Semibold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/fonts/SourceCodePro-Semibold.woff2 -------------------------------------------------------------------------------- /assets/fonts/SourceCodePro-SemiboldIt.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/fonts/SourceCodePro-SemiboldIt.woff2 -------------------------------------------------------------------------------- /assets/fonts/SourceCodePro-ExtraLightIt.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/fonts/SourceCodePro-ExtraLightIt.woff2 -------------------------------------------------------------------------------- /assets/images/admin/welcome-guide/slide_1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/welcome-guide/slide_1.gif -------------------------------------------------------------------------------- /assets/images/admin/welcome-guide/slide_2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/welcome-guide/slide_2.gif -------------------------------------------------------------------------------- /assets/images/admin/welcome-guide/slide_3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/welcome-guide/slide_3.gif -------------------------------------------------------------------------------- /assets/images/admin/welcome-guide/slide_4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/welcome-guide/slide_4.jpg -------------------------------------------------------------------------------- /assets/images/admin/welcome-guide/slide_5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/welcome-guide/slide_5.jpg -------------------------------------------------------------------------------- /src/admin/components/shortcut/style.scss: -------------------------------------------------------------------------------- 1 | .chbe-admin-shortcut-modal { 2 | 3 | ul { 4 | padding-left: 1.5em; 5 | margin: 0; 6 | list-style: disc outside; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/hover.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/hover.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/folding.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/folding.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/links_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/links_1.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/links_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/links_2.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/rulers.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/rulers.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-settings/emmet.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-settings/emmet.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/find/loop.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/find/loop.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/padding/top.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/padding/top.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/word-wrap_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/word-wrap_1.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/word-wrap_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/word-wrap_2.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/word-wrap_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/word-wrap_3.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/word-wrap_4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/word-wrap_4.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/auto-indent_1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/auto-indent_1.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/auto-indent_2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/auto-indent_2.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/auto-indent_3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/auto-indent_3.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/auto-surround_1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/auto-surround_1.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/auto-surround_2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/auto-surround_2.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/auto-surround_3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/auto-surround_3.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/auto-surround_4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/auto-surround_4.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/contextmenu_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/contextmenu_1.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/contextmenu_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/contextmenu_2.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/cursor-style_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/cursor-style_1.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/cursor-style_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/cursor-style_2.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/cursor-style_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/cursor-style_3.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/cursor-style_4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/cursor-style_4.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/cursor-style_5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/cursor-style_5.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/cursor-style_6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/cursor-style_6.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/drag-and-drop.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/drag-and-drop.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/glyph-margin_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/glyph-margin_1.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/glyph-margin_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/glyph-margin_2.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/line-numbers_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/line-numbers_1.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/line-numbers_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/line-numbers_2.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/line-numbers_3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/line-numbers_3.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/line-numbers_4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/line-numbers_4.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/minimap/enabled.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/minimap/enabled.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/minimap/scale.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/minimap/scale.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/minimap/side_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/minimap/side_1.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/minimap/side_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/minimap/side_2.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/minimap/size_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/minimap/size_1.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/minimap/size_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/minimap/size_2.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/minimap/size_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/minimap/size_3.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/padding/bottom.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/padding/bottom.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/use-tab-stops_1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/use-tab-stops_1.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/use-tab-stops_2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/use-tab-stops_2.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/column-selection.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/column-selection.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/cursor-blinking_1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/cursor-blinking_1.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/cursor-blinking_2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/cursor-blinking_2.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/cursor-blinking_3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/cursor-blinking_3.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/cursor-blinking_4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/cursor-blinking_4.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/cursor-blinking_5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/cursor-blinking_5.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/font-ligatures_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/font-ligatures_1.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/font-ligatures_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/font-ligatures_2.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/format-on-paste_1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/format-on-paste_1.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/format-on-paste_2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/format-on-paste_2.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/match-brackets_1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/match-brackets_1.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/match-brackets_2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/match-brackets_2.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/match-brackets_3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/match-brackets_3.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/mouse-wheel-zoom.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/mouse-wheel-zoom.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/quick-suggestions.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/quick-suggestions.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/word-wrap-column.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/word-wrap-column.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/wrapping-indent_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/wrapping-indent_1.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/wrapping-indent_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/wrapping-indent_2.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/wrapping-indent_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/wrapping-indent_3.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/wrapping-indent_4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/wrapping-indent_4.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/folding-highlight_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/folding-highlight_1.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/folding-highlight_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/folding-highlight_2.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/folding-strategy_1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/folding-strategy_1.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/folding-strategy_2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/folding-strategy_2.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/minimap/max-column.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/minimap/max-column.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/multi-cursor-paste_1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/multi-cursor-paste_1.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/multi-cursor-paste_2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/multi-cursor-paste_2.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/render-whitespace_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/render-whitespace_1.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/render-whitespace_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/render-whitespace_2.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/render-whitespace_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/render-whitespace_3.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/render-whitespace_4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/render-whitespace_4.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/render-whitespace_5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/render-whitespace_5.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/rounded-selection_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/rounded-selection_1.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/rounded-selection_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/rounded-selection_2.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/scrollbar/vertical_1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/scrollbar/vertical_1.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/scrollbar/vertical_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/scrollbar/vertical_2.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/scrollbar/vertical_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/scrollbar/vertical_3.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/smooth-scrolling_1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/smooth-scrolling_1.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/smooth-scrolling_2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/smooth-scrolling_2.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/sticky-tab-stops_1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/sticky-tab-stops_1.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/sticky-tab-stops_2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/sticky-tab-stops_2.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/suggest-font-size_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/suggest-font-size_1.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/suggest-font-size_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/suggest-font-size_2.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/suggest/show-icons_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/suggest/show-icons_1.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/suggest/show-icons_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/suggest/show-icons_2.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/auto-closing-quotes_1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/auto-closing-quotes_1.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/auto-closing-quotes_2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/auto-closing-quotes_2.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/auto-closing-quotes_3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/auto-closing-quotes_3.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/line-decorations-width.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/line-decorations-width.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/line-numbers-min-chars.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/line-numbers-min-chars.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/minimap/show-slider_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/minimap/show-slider_1.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/minimap/show-slider_2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/minimap/show-slider_2.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/multi-cursor-modifier.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/multi-cursor-modifier.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/render-final-newline_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/render-final-newline_1.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/render-final-newline_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/render-final-newline_2.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/render-indent-guides_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/render-indent-guides_1.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/render-indent-guides_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/render-indent-guides_2.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/scrollbar/arrow-size_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/scrollbar/arrow-size_1.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/scrollbar/arrow-size_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/scrollbar/arrow-size_2.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/scrollbar/horizontal_1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/scrollbar/horizontal_1.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/scrollbar/horizontal_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/scrollbar/horizontal_2.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/scrollbar/horizontal_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/scrollbar/horizontal_3.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/selection-highlight_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/selection-highlight_1.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/selection-highlight_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/selection-highlight_2.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/suggest-line-height_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/suggest-line-height_1.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/suggest-line-height_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/suggest-line-height_2.jpg -------------------------------------------------------------------------------- /src/admin/editor-config/components/editor-preview/style.scss: -------------------------------------------------------------------------------- 1 | .chbe-admin-editor-config-editor-preview { 2 | height: calc(100vh - 400px); 3 | 4 | @media screen and (max-width: 782px) { 5 | height: 50vh; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/auto-closing-brackets_1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/auto-closing-brackets_1.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/auto-closing-brackets_2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/auto-closing-brackets_2.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/auto-closing-brackets_3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/auto-closing-brackets_3.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/comments_insert-space_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/comments_insert-space_1.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/comments_insert-space_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/comments_insert-space_2.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/empty-selection-clipboard.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/empty-selection-clipboard.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/occurrences-highlight_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/occurrences-highlight_1.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/occurrences-highlight_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/occurrences-highlight_2.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/overview-ruler-border_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/overview-ruler-border_1.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/overview-ruler-border_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/overview-ruler-border_2.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/quick-suggestions-delay_1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/quick-suggestions-delay_1.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/quick-suggestions-delay_2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/quick-suggestions-delay_2.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/render-line-highlight_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/render-line-highlight_1.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/render-line-highlight_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/render-line-highlight_2.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/render-line-highlight_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/render-line-highlight_3.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/render-line-highlight_4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/render-line-highlight_4.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/scroll-beyond-last-line_1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/scroll-beyond-last-line_1.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/scroll-beyond-last-line_2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/scroll-beyond-last-line_2.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/scrollbar/scroll-by-page.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/scrollbar/scroll-by-page.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/scrollbar/use-shadows_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/scrollbar/use-shadows_1.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/scrollbar/use-shadows_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/scrollbar/use-shadows_2.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/select-on-line-numbers_1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/select-on-line-numbers_1.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/select-on-line-numbers_2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/select-on-line-numbers_2.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/show-folding-controls_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/show-folding-controls_1.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/show-folding-controls_2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/show-folding-controls_2.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/cursor-surrounding-lines_1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/cursor-surrounding-lines_1.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/cursor-surrounding-lines_2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/cursor-surrounding-lines_2.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/minimap/render-characters_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/minimap/render-characters_1.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/minimap/render-characters_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/minimap/render-characters_2.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/render-control-characters_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/render-control-characters_1.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/render-control-characters_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/render-control-characters_2.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/scroll-beyond-last-column_1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/scroll-beyond-last-column_1.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/scroll-beyond-last-column_2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/scroll-beyond-last-column_2.gif -------------------------------------------------------------------------------- /playwright.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | const config = require( '@wordpress/scripts/config/playwright.config.js' ); 5 | 6 | export default { 7 | ...config, 8 | testDir: './test/e2e', 9 | }; 10 | -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/find/addextra-space-on-top_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/find/addextra-space-on-top_1.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/find/addextra-space-on-top_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/find/addextra-space-on-top_2.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/copy-with-syntax-highlighting_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/copy-with-syntax-highlighting_1.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/copy-with-syntax-highlighting_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/copy-with-syntax-highlighting_2.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/cursor-smooth-caret-animation_1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/cursor-smooth-caret-animation_1.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/cursor-smooth-caret-animation_2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/cursor-smooth-caret-animation_2.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/cursor-surrounding-lines-style_1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/cursor-surrounding-lines-style_1.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/cursor-surrounding-lines-style_2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/cursor-surrounding-lines-style_2.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/hide-cursor-in-overview-ruler_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/hide-cursor-in-overview-ruler_1.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/hide-cursor-in-overview-ruler_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/hide-cursor-in-overview-ruler_2.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/highlight-active-indent-guide_1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/highlight-active-indent-guide_1.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/highlight-active-indent-guide_2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/highlight-active-indent-guide_2.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/scrollbar/vertical-has-arrows_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/scrollbar/vertical-has-arrows_1.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/scrollbar/vertical-has-arrows_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/scrollbar/vertical-has-arrows_2.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/scrollbar/horizontal-has-arrows_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/scrollbar/horizontal-has-arrows_1.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/scrollbar/horizontal-has-arrows_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/scrollbar/horizontal-has-arrows_2.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/scrollbar/vertical-scrollbar-size_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/scrollbar/vertical-scrollbar-size_1.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/scrollbar/vertical-scrollbar-size_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/scrollbar/vertical-scrollbar-size_2.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/unfold-on-click-after-end-of-line.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/unfold-on-click-after-end-of-line.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/scrollbar/horizontal-scrollbar-size_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/scrollbar/horizontal-scrollbar-size_1.jpg -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/scrollbar/horizontal-scrollbar-size_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/scrollbar/horizontal-scrollbar-size_2.jpg -------------------------------------------------------------------------------- /src/admin/components/welcome-guide/style.scss: -------------------------------------------------------------------------------- 1 | @use "~@wordpress/base-styles/variables" as variables; 2 | 3 | .chbe-admin-welcome-guide-modal { 4 | width: 312px; 5 | 6 | img { 7 | margin-bottom: variables.$grid-unit-20; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/find/seed-search-string-from-selection.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/find/seed-search-string-from-selection.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/render-line-highlight-only-when-focus_1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/render-line-highlight-only-when-focus_1.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/render-line-highlight-only-when-focus_2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/render-line-highlight-only-when-focus_2.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/scrollbar/always-consume-mouse-wheel_1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/scrollbar/always-consume-mouse-wheel_1.gif -------------------------------------------------------------------------------- /assets/images/admin/editor-config/editor-options/scrollbar/always-consume-mouse-wheel_2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-hamano/custom-html-block-extension/HEAD/assets/images/admin/editor-config/editor-options/scrollbar/always-consume-mouse-wheel_2.gif -------------------------------------------------------------------------------- /src/admin/editor-config/editor-settings/index.js: -------------------------------------------------------------------------------- 1 | export { default as Theme } from './theme'; 2 | export { default as TabSize } from './tab-size'; 3 | export { default as InsertSpaces } from './insert-spaces'; 4 | export { default as Emmet } from './emmet'; 5 | -------------------------------------------------------------------------------- /src/admin/editor-config/components/filter/style.scss: -------------------------------------------------------------------------------- 1 | @use "~@wordpress/base-styles/colors" as colors; 2 | 3 | // Back compat style for WordPress 6.8 4 | .chbe-admin-editor-config-filter .components-input-control__container { 5 | background: colors.$white; 6 | } 7 | -------------------------------------------------------------------------------- /.prettierrc.js: -------------------------------------------------------------------------------- 1 | const config = { 2 | ...require( '@wordpress/prettier-config' ), 3 | semi: true, 4 | useTabs: true, 5 | tabWidth: 2, 6 | singleQuote: true, 7 | printWidth: 100, 8 | bracketSpacing: true, 9 | parenSpacing: true, 10 | bracketSameLine: false, 11 | }; 12 | 13 | module.exports = config; 14 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | insert_final_newline = true 7 | trim_trailing_whitespace = true 8 | indent_style = tab 9 | indent_size = 2 10 | 11 | [*.{yml,yaml}] 12 | indent_style = space 13 | indent_size = 2 14 | 15 | [*.md] 16 | trim_trailing_whitespace = false 17 | -------------------------------------------------------------------------------- /src/lib/helper.js: -------------------------------------------------------------------------------- 1 | // Round values to the specified minimum and maximum values. 2 | export const toNumber = ( value, min = 0, max = null ) => { 3 | value = Number( value ); 4 | 5 | if ( isNaN( value ) || value < min ) { 6 | value = min; 7 | } 8 | 9 | if ( null !== max && value > max ) { 10 | value = max; 11 | } 12 | 13 | return value; 14 | }; 15 | -------------------------------------------------------------------------------- /src/admin/components/snackbars/style.scss: -------------------------------------------------------------------------------- 1 | @use "~@wordpress/base-styles/variables" as variables; 2 | 3 | .chbe-admin-snackbars { 4 | right: 0; 5 | bottom: variables.$grid-unit-20; 6 | padding: 0 variables.$grid-unit-20; 7 | position: fixed; 8 | 9 | .components-snackbar-list__notice-container { 10 | display: flex; 11 | justify-content: flex-end; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /assets/css/ubuntu-mono.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: "Ubuntu Mono"; 3 | font-style: normal; 4 | font-weight: 300; 5 | font-stretch: normal; 6 | src: url(../fonts/UbuntuMono-Regular.woff2) format("woff2"); 7 | } 8 | 9 | @font-face { 10 | font-family: "Ubuntu Mono"; 11 | font-style: normal; 12 | font-weight: 700; 13 | font-stretch: normal; 14 | src: url(../fonts/UbuntuMono-Bold.woff2) format("woff2"); 15 | } 16 | 17 | -------------------------------------------------------------------------------- /assets/css/anonymous-pro.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: "Anonymous Pro"; 3 | font-style: normal; 4 | font-weight: 300; 5 | font-stretch: normal; 6 | src: url(../fonts/AnonymousPro-Regular.woff2) format("woff2"); 7 | } 8 | 9 | @font-face { 10 | font-family: "Anonymous Pro"; 11 | font-style: normal; 12 | font-weight: 700; 13 | font-stretch: normal; 14 | src: url(../fonts/AnonymousPro-Bold.woff2) format("woff2"); 15 | } 16 | 17 | -------------------------------------------------------------------------------- /assets/css/ubuntu-mono-italic.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: "Ubuntu Mono Italic"; 3 | font-style: normal; 4 | font-weight: 300; 5 | font-stretch: normal; 6 | src: url(../fonts/UbuntuMono-lt.woff2) format("woff2"); 7 | } 8 | 9 | @font-face { 10 | font-family: "Ubuntu Mono Italic"; 11 | font-style: normal; 12 | font-weight: 700; 13 | font-stretch: normal; 14 | src: url(../fonts/UbuntuMono-Boldlt.woff2) format("woff2"); 15 | } 16 | 17 | -------------------------------------------------------------------------------- /assets/css/anonymous-pro-italic.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: "Anonymous Pro Italic"; 3 | font-style: normal; 4 | font-weight: 300; 5 | font-stretch: normal; 6 | src: url(../fonts/AnonymousPro-lt.woff2) format("woff2"); 7 | } 8 | 9 | @font-face { 10 | font-family: "Anonymous Pro Italic"; 11 | font-style: normal; 12 | font-weight: 700; 13 | font-stretch: normal; 14 | src: url(../fonts/AnonymousPro-Boldlt.woff2) format("woff2"); 15 | } 16 | 17 | -------------------------------------------------------------------------------- /.distignore: -------------------------------------------------------------------------------- 1 | /.git 2 | /.github 3 | /.husky 4 | /.wordpress-org 5 | /artifacts 6 | /bin 7 | /node_modules 8 | /test 9 | /vendor 10 | .distignore 11 | .editorconfig 12 | .eslintignore 13 | .eslintrc.js 14 | .gitignore 15 | .npmrc 16 | .nvmrc 17 | .prettierrc.js 18 | .stylelintrc.js 19 | .wp-env.json 20 | composer.json 21 | composer.lock 22 | playwright.config.ts 23 | package.json 24 | package-lock.json 25 | phpcs.ruleset.xml 26 | README.md 27 | webpack.config.js 28 | -------------------------------------------------------------------------------- /src/admin/tools/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __experimentalVStack as VStack } from '@wordpress/components'; 5 | 6 | /** 7 | * Internal dependencies 8 | */ 9 | import ExportTool from './components/export-tool'; 10 | import ImportTool from './components/import-tool'; 11 | 12 | export default function Tools() { 13 | return ( 14 | 15 | 16 | 17 | 18 | ); 19 | } 20 | -------------------------------------------------------------------------------- /.wp-env.json: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": [ 3 | ".", 4 | "https://downloads.wordpress.org/plugin/classic-editor.zip", 5 | "https://downloads.wordpress.org/plugin/wordpress-beta-tester.zip", 6 | "https://downloads.wordpress.org/plugin/wp-downgrade.zip" 7 | ], 8 | "env": { 9 | "development": { 10 | "phpmyadminPort": 9000 11 | }, 12 | "tests": { 13 | "phpmyadminPort": 9001, 14 | "config": { 15 | "WP_DEBUG": true, 16 | "SCRIPT_DEBUG": true 17 | } 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | const defaultConfig = require( '@wordpress/scripts/config/webpack.config' ); 5 | 6 | module.exports = { 7 | ...defaultConfig, 8 | resolve: { 9 | ...defaultConfig.resolve, 10 | modules: [ 'node_modules', 'src' ], 11 | extensions: [ '.js', '.jsx' ], 12 | }, 13 | output: { 14 | ...defaultConfig.output, 15 | clean: false, 16 | }, 17 | performance: { 18 | maxEntrypointSize: 1000000, 19 | maxAssetSize: 1000000, 20 | }, 21 | }; 22 | -------------------------------------------------------------------------------- /assets/js/pointer.js: -------------------------------------------------------------------------------- 1 | ( function ( $ ) { 2 | $( function () { 3 | if ( window.chbePointer ) { 4 | $( '#menu-settings .wp-has-submenu' ) 5 | .pointer( { 6 | content: window.chbePointer.content, 7 | position: { edge: 'left', align: 'center' }, 8 | close() { 9 | $.post( 'admin-ajax.php', { 10 | action: 'dismiss-wp-pointer', 11 | pointer: window.chbePointer.name, 12 | } ); 13 | }, 14 | } ) 15 | .pointer( 'open' ); 16 | } 17 | } ); 18 | } )( jQuery ); 19 | -------------------------------------------------------------------------------- /src/admin/components/header/style.scss: -------------------------------------------------------------------------------- 1 | @use "~@wordpress/base-styles/variables" as variables; 2 | @use "~@wordpress/base-styles/colors" as colors; 3 | 4 | 5 | .chbe-admin-header { 6 | padding: variables.$grid-unit-20 0; 7 | background-color: colors.$white; 8 | 9 | .chbe-admin-header__info { 10 | position: absolute; 11 | top: 0; 12 | right: variables.$grid-unit-20 + variables.$grid-unit-05; 13 | 14 | @media screen and (max-width: 782px) { 15 | position: static; 16 | margin-top: variables.$grid-unit-20; 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /.stylelintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: [ '@wordpress/stylelint-config/scss-stylistic' ], 3 | ignoreFiles: [ 4 | 'build/**/*.css', 5 | 'node_modules/**/*.css', 6 | 'vendor/**/*.css', 7 | '**/*.js', 8 | '**/*.svg', 9 | ], 10 | rules: { 11 | 'no-descending-specificity': null, 12 | 'font-weight-notation': null, 13 | 'font-family-no-missing-generic-family-keyword': null, 14 | 'selector-class-pattern': null, 15 | 'at-rule-empty-line-before': null, 16 | 'declaration-property-unit-allowed-list': { 17 | 'line-height': [], 18 | }, 19 | }, 20 | }; 21 | -------------------------------------------------------------------------------- /src/theme-plugin-editor/style.scss: -------------------------------------------------------------------------------- 1 | // Monaco Editor common styles 2 | @use "../components/monaco-editor/style"; 3 | 4 | // Monaco Editor 5 | #monaco-editor { 6 | height: calc(100vh - 295px); 7 | min-height: 60vh; 8 | margin-right: 4em; 9 | 10 | @media screen and (max-width: 782px) { 11 | margin-right: 0; 12 | } 13 | } 14 | 15 | // Original editor textarea 16 | #template textarea#newcontent { 17 | position: fixed !important; 18 | top: -9999px !important; 19 | left: -9999px !important; 20 | z-index: -1; 21 | display: block !important; 22 | opacity: 0 !important; 23 | } 24 | -------------------------------------------------------------------------------- /src/components/block-icon.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { Path, SVG, Polygon } from '@wordpress/components'; 5 | 6 | const BlockIcon = ( 7 | 8 | 9 | 10 | 11 | ); 12 | 13 | export default BlockIcon; 14 | -------------------------------------------------------------------------------- /phpcs.ruleset.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | A custom set of code standard rules to check for WordPress themes. 4 | 5 | 6 | 7 | 8 | */node_modules/* 9 | */vendor/* 10 | */build/* 11 | */*.js 12 | */*.css 13 | 14 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "t-hamano/custom-html-block-extension", 3 | "description": "Extend Custom HTML block to evolve into the advanced code editor.", 4 | "license": "GPL-2.0-or-later", 5 | "authors": [ 6 | { 7 | "name": "Aki Hamano" 8 | } 9 | ], 10 | "require-dev": { 11 | "squizlabs/php_codesniffer": "*", 12 | "wp-coding-standards/wpcs": "^3.2" 13 | }, 14 | "scripts": { 15 | "phpcs": "phpcs --config-set installed_paths vendor/wp-coding-standards/wpcs,vendor/phpcsstandards/phpcsextra,vendor/phpcsstandards/phpcsutils", 16 | "lint": "phpcs ./ --standard=./phpcs.ruleset.xml" 17 | }, 18 | "config": { 19 | "allow-plugins": { 20 | "dealerdirect/phpcodesniffer-composer-installer": true 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/block-editor/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { addFilter } from '@wordpress/hooks'; 5 | 6 | /** 7 | * Internal dependencies 8 | */ 9 | import icon from '../components/block-icon'; 10 | import edit from './edit'; 11 | 12 | const customHtmlBlockExtension = ( settings ) => { 13 | if ( 'core/html' !== settings.name ) { 14 | return settings; 15 | } 16 | 17 | const newSettings = { 18 | ...settings, 19 | icon, 20 | attributes: { 21 | ...settings.attributes, 22 | height: { 23 | type: 'number', 24 | default: 300, 25 | }, 26 | }, 27 | edit, 28 | }; 29 | return newSettings; 30 | }; 31 | 32 | addFilter( 33 | 'blocks.registerBlockType', 34 | 'wildworks/custom-html-block-extension', 35 | customHtmlBlockExtension 36 | ); 37 | -------------------------------------------------------------------------------- /src/admin/components/snackbars/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { SnackbarList } from '@wordpress/components'; 5 | import { useSelect, useDispatch } from '@wordpress/data'; 6 | import { store as noticesStore } from '@wordpress/notices'; 7 | 8 | // Last three notices. Slices from the tail end of the list. 9 | const MAX_VISIBLE_NOTICES = -3; 10 | 11 | export default function Snackbars() { 12 | const notices = useSelect( ( select ) => select( noticesStore ).getNotices(), [] ); 13 | const { removeNotice } = useDispatch( noticesStore ); 14 | const filteredNotices = notices.slice( MAX_VISIBLE_NOTICES ); 15 | 16 | return ( 17 | 22 | ); 23 | } 24 | -------------------------------------------------------------------------------- /assets/css/fira-code.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: "Fira Code"; 3 | font-style: normal; 4 | font-weight: 300; 5 | src: url(../fonts/FiraCode-Light.woff2) format("woff2"); 6 | } 7 | 8 | @font-face { 9 | font-family: "Fira Code"; 10 | font-style: normal; 11 | font-weight: 400; 12 | src: url(../fonts/FiraCode-Regular.woff2) format("woff2"); 13 | } 14 | 15 | @font-face { 16 | font-family: "Fira Code"; 17 | font-style: normal; 18 | font-weight: 500; 19 | src: url(../fonts/FiraCode-Medium.woff2) format("woff2"); 20 | } 21 | 22 | @font-face { 23 | font-family: "Fira Code"; 24 | font-style: normal; 25 | font-weight: 600; 26 | src: url(../fonts/FiraCode-SemiBold.woff2) format("woff2"); 27 | } 28 | 29 | @font-face { 30 | font-family: "Fira Code"; 31 | font-style: normal; 32 | font-weight: 700; 33 | src: url(../fonts/FiraCode-Bold.woff2) format("woff2"); 34 | } 35 | -------------------------------------------------------------------------------- /src/admin/components/header/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { 6 | Icon, 7 | __experimentalHeading as Heading, 8 | __experimentalHStack as HStack, 9 | __experimentalVStack as VStack, 10 | } from '@wordpress/components'; 11 | 12 | /** 13 | * Internal dependencies 14 | */ 15 | import BlockIcon from '../../../components/block-icon'; 16 | import WelcomeGuide from '../welcome-guide'; 17 | import Shortcut from '../shortcut'; 18 | 19 | export default function Header() { 20 | return ( 21 |
22 |
23 | 24 | 25 | 26 | { __( 'Custom HTML Block Extension', 'custom-html-block-extension' ) } 27 | 28 | 29 | 30 | 31 | 32 | 33 |
34 |
35 | ); 36 | } 37 | -------------------------------------------------------------------------------- /src/block-editor/style.scss: -------------------------------------------------------------------------------- 1 | // WordPress base styles 2 | @use "~@wordpress/base-styles/variables" as variables; 3 | @use "~@wordpress/base-styles/colors" as colors; 4 | 5 | // Monaco Editor styles 6 | @use "../components/monaco-editor/style"; 7 | 8 | // Change indentation popover 9 | .chbe-popover { 10 | 11 | .components-popover__content { 12 | padding: variables.$grid-unit-20; 13 | } 14 | 15 | .chbe-popover__subtitle { 16 | padding: variables.$grid-unit-05 variables.$grid-unit-10; 17 | margin: 0 (variables.$grid-unit-20 * -1); 18 | color: colors.$white; 19 | text-align: center; 20 | background: var(--wp-admin-theme-color); 21 | } 22 | 23 | .chbe-popover__col { 24 | padding: 0 variables.$grid-unit-20 variables.$grid-unit-20; 25 | border: variables.$border-width solid var(--wp-admin-theme-color); 26 | } 27 | } 28 | 29 | 30 | // Modal HTML Editor 31 | .chbe-fullscreen-editor { 32 | 33 | .components-modal__content { 34 | display: flex; 35 | flex-flow: column; 36 | } 37 | 38 | .components-modal__header + div { 39 | flex: 1; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/admin/editor-config/style.scss: -------------------------------------------------------------------------------- 1 | @use "~@wordpress/base-styles/variables" as variables; 2 | @use "~@wordpress/base-styles/colors" as colors; 3 | 4 | @use "./components/editor-preview/style" as editorPreview; 5 | @use "./components/item-help/style" as itemHelp; 6 | @use "./components/filter/style" as filter; 7 | 8 | .chbe-admin-editor-config { 9 | 10 | .components-select-control { 11 | min-width: 200px; 12 | } 13 | 14 | .components-range-control { 15 | width: 100%; 16 | max-width: 300px; 17 | } 18 | 19 | .components-toggle-control { 20 | max-width: 300px; 21 | } 22 | 23 | .chbe-admin-editor-config__settings { 24 | flex: 1; 25 | } 26 | 27 | .chbe-admin-editor-config__basic-settings { 28 | padding: variables.$grid-unit-30; 29 | background: colors.$white; 30 | border-top: variables.$border-width solid colors.$gray-300; 31 | border-bottom: variables.$border-width solid colors.$gray-300; 32 | } 33 | 34 | .chbe-admin-editor-config__preview { 35 | position: sticky; 36 | top: variables.$grid-unit-50; 37 | width: 50%; 38 | 39 | @media screen and (max-width: 782px) { 40 | position: static; 41 | width: 100%; 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /bin/delete-sourcemaps.js: -------------------------------------------------------------------------------- 1 | /** 2 | * External dependencies 3 | */ 4 | const path = require( 'path' ); 5 | const fs = require( 'fs' ); 6 | 7 | /** 8 | * Remove commented lines in the source map URL from Monaco Editor core files. 9 | * @param {string} dir 10 | */ 11 | function deleteMaps( dir ) { 12 | fs.readdir( dir, function ( dirError, files ) { 13 | files.forEach( ( file ) => { 14 | const target = path.join( dir, file ); 15 | const stats = fs.statSync( target ); 16 | 17 | if ( stats.isDirectory() ) { 18 | deleteMaps( target ); 19 | } else { 20 | const extname = path.extname( target ); 21 | 22 | if ( extname === '.js' ) { 23 | fs.readFile( target, 'utf8', ( fileError, data ) => { 24 | const lines = data.split( '\n' ); 25 | const lastLine = lines[ lines.length - 1 ]; 26 | const hasSourceMappingLine = 27 | lastLine.includes( 'sourceMappingURL' ) && lines.length > 1; 28 | 29 | if ( hasSourceMappingLine ) { 30 | fs.writeFileSync( target, lines.slice( 0, lines.length - 1 ).join( '\n' ) ); 31 | } 32 | } ); 33 | } 34 | } 35 | } ); 36 | } ); 37 | } 38 | 39 | [ './build/vendor/' ].map( deleteMaps ); 40 | -------------------------------------------------------------------------------- /src/admin/editor-config/components/item-help/style.scss: -------------------------------------------------------------------------------- 1 | @use "~@wordpress/base-styles/variables" as variables; 2 | 3 | // Toggle button 4 | .chbe-admin-editor-config-item-help-toggle { 5 | margin-top: -2px; 6 | } 7 | 8 | // Modal component 9 | .chbe-admin-editor-config-item-help-modal { 10 | max-width: 800px; 11 | 12 | img { 13 | display: block; 14 | max-width: 100%; 15 | } 16 | 17 | .chbe-admin-editor-config-item-help-modal__decription { 18 | 19 | ul { 20 | padding-left: 1.5em; 21 | margin-left: 0; 22 | list-style: disc outside; 23 | } 24 | } 25 | 26 | .chbe-admin-editor-config-item-help-modal__items { 27 | display: flex; 28 | flex-wrap: wrap; 29 | gap: variables.$grid-unit-30; 30 | 31 | @media screen and (max-width: 782px) { 32 | flex-flow: column; 33 | } 34 | 35 | &.is-col-2 > * { 36 | width: calc(50% - 12px); 37 | } 38 | 39 | &.is-col-3 > * { 40 | width: calc(33.33% - 16px); 41 | } 42 | 43 | &.is-col-4 > * { 44 | width: calc(25% - 18px); 45 | } 46 | 47 | &.is-col-5 > * { 48 | width: calc(20% - 20px); 49 | } 50 | } 51 | 52 | .chbe-admin-editor-config-item-help-modal__item-button { 53 | height: auto; 54 | padding: variables.$grid-unit-05; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /custom-html-block-extension.php: -------------------------------------------------------------------------------- 1 | 'Version', 28 | 'TextDomain' => 'Text Domain', 29 | ) 30 | ); 31 | 32 | define( 'CHBE_VERSION', $chbe_data['Version'] ); 33 | define( 'CHBE_NAMESPACE', $chbe_data['TextDomain'] ); 34 | define( 'CHBE_PATH', untrailingslashit( plugin_dir_path( __FILE__ ) ) ); 35 | define( 'CHBE_URL', untrailingslashit( plugin_dir_url( __FILE__ ) ) ); 36 | define( 'CHBE_BASENAME', plugin_basename( __FILE__ ) ); 37 | 38 | require_once __DIR__ . '/classes/class-init.php'; 39 | new Custom_Html_Block_Extension\Init(); 40 | -------------------------------------------------------------------------------- /src/admin/editor-config/editor-settings/tab-size.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { useContext } from '@wordpress/element'; 6 | import { RangeControl } from '@wordpress/components'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import { AdminContext } from '../../index'; 12 | import { EditorConfigContext } from '../index'; 13 | import { toNumber } from '../../../lib/helper'; 14 | 15 | export default function TabSize() { 16 | const { editorSettings, setEditorSettings } = useContext( AdminContext ); 17 | const { searchQuery } = useContext( EditorConfigContext ); 18 | 19 | const title = __( 'Indent width', 'custom-html-block-extension' ); 20 | const isMatch = searchQuery && title.toLowerCase().includes( searchQuery.toLowerCase() ); 21 | 22 | if ( searchQuery && ! isMatch ) { 23 | return null; 24 | } 25 | 26 | const onChange = ( value ) => { 27 | setEditorSettings( { 28 | ...editorSettings, 29 | tabSize: value ? toNumber( value, 1, 8 ) : 2, 30 | } ); 31 | }; 32 | 33 | return ( 34 | 44 | ); 45 | } 46 | -------------------------------------------------------------------------------- /src/admin/editor-config/editor-options/font-size.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { useContext } from '@wordpress/element'; 6 | import { RangeControl } from '@wordpress/components'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import { AdminContext } from '../../index'; 12 | import { EditorConfigContext } from '../index'; 13 | import { toNumber } from '../../../lib/helper'; 14 | 15 | export default function FontSize() { 16 | const { editorOptions, setEditorOptions } = useContext( AdminContext ); 17 | const { searchQuery } = useContext( EditorConfigContext ); 18 | 19 | const title = __( 'Font size (px)', 'custom-html-block-extension' ); 20 | const isMatch = searchQuery && title.toLowerCase().includes( searchQuery.toLowerCase() ); 21 | 22 | if ( searchQuery && ! isMatch ) { 23 | return null; 24 | } 25 | 26 | const onChange = ( value ) => { 27 | setEditorOptions( { 28 | ...editorOptions, 29 | fontSize: value ? toNumber( value, 10, 30 ) : 14, 30 | } ); 31 | }; 32 | 33 | return ( 34 | 44 | ); 45 | } 46 | -------------------------------------------------------------------------------- /src/admin/editor-config/editor-options/cursor-width.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { useContext } from '@wordpress/element'; 6 | import { RangeControl } from '@wordpress/components'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import { AdminContext } from '../../index'; 12 | import { EditorConfigContext } from '../index'; 13 | import { toNumber } from '../../../lib/helper'; 14 | 15 | export default function CursorWidth() { 16 | const { editorOptions, setEditorOptions } = useContext( AdminContext ); 17 | const { searchQuery } = useContext( EditorConfigContext ); 18 | 19 | const title = __( 'Cursor width', 'custom-html-block-extension' ); 20 | const isMatch = searchQuery && title.toLowerCase().includes( searchQuery.toLowerCase() ); 21 | 22 | if ( searchQuery && ! isMatch ) { 23 | return null; 24 | } 25 | 26 | const onChange = ( value ) => { 27 | setEditorOptions( { 28 | ...editorOptions, 29 | cursorWidth: value ? toNumber( value, 2, 10 ) : 2, 30 | } ); 31 | }; 32 | 33 | return ( 34 | 44 | ); 45 | } 46 | -------------------------------------------------------------------------------- /src/admin/editor-config/editor-options/line-height.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { useContext } from '@wordpress/element'; 6 | import { RangeControl } from '@wordpress/components'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import { AdminContext } from '../../index'; 12 | import { EditorConfigContext } from '../index'; 13 | import { toNumber } from '../../../lib/helper'; 14 | 15 | export default function LineHeight() { 16 | const { editorOptions, setEditorOptions } = useContext( AdminContext ); 17 | const { searchQuery } = useContext( EditorConfigContext ); 18 | 19 | const title = __( 'Line height (px)', 'custom-html-block-extension' ); 20 | const isMatch = searchQuery && title.toLowerCase().includes( searchQuery.toLowerCase() ); 21 | 22 | if ( searchQuery && ! isMatch ) { 23 | return null; 24 | } 25 | 26 | const onChange = ( value ) => { 27 | setEditorOptions( { 28 | ...editorOptions, 29 | lineHeight: value ? toNumber( value, 10, 60 ) : 24, 30 | } ); 31 | }; 32 | 33 | return ( 34 | 44 | ); 45 | } 46 | -------------------------------------------------------------------------------- /src/admin/editor-config/editor-options/letter-spacing.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { useContext } from '@wordpress/element'; 6 | import { RangeControl } from '@wordpress/components'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import { AdminContext } from '../../index'; 12 | import { EditorConfigContext } from '../index'; 13 | import { toNumber } from '../../../lib/helper'; 14 | 15 | export default function LetterSpacing() { 16 | const { editorOptions, setEditorOptions } = useContext( AdminContext ); 17 | const { searchQuery } = useContext( EditorConfigContext ); 18 | 19 | const title = __( 'Letter spacing (px)', 'custom-html-block-extension' ); 20 | const isMatch = searchQuery && title.toLowerCase().includes( searchQuery.toLowerCase() ); 21 | 22 | if ( searchQuery && ! isMatch ) { 23 | return null; 24 | } 25 | 26 | const onChange = ( value ) => { 27 | setEditorOptions( { 28 | ...editorOptions, 29 | letterSpacing: value ? toNumber( value, -2, 2 ) : 0, 30 | } ); 31 | }; 32 | 33 | return ( 34 | 45 | ); 46 | } 47 | -------------------------------------------------------------------------------- /src/admin/editor-config/editor-options/mouse-wheel-scroll-sensitivity.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { useContext } from '@wordpress/element'; 6 | import { RangeControl } from '@wordpress/components'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import { AdminContext } from '../../index'; 12 | import { EditorConfigContext } from '../index'; 13 | import { toNumber } from '../../../lib/helper'; 14 | 15 | export default function MouseWheelScrollSensitivity() { 16 | const { editorOptions, setEditorOptions } = useContext( AdminContext ); 17 | const { searchQuery } = useContext( EditorConfigContext ); 18 | 19 | const title = __( 'Mouse wheel scroll speed', 'custom-html-block-extension' ); 20 | const isMatch = searchQuery && title.toLowerCase().includes( searchQuery.toLowerCase() ); 21 | 22 | if ( searchQuery && ! isMatch ) { 23 | return null; 24 | } 25 | 26 | const onChange = ( value ) => { 27 | setEditorOptions( { 28 | ...editorOptions, 29 | mouseWheelScrollSensitivity: value ? toNumber( value, 1, 10 ) : 1, 30 | } ); 31 | }; 32 | 33 | return ( 34 | 44 | ); 45 | } 46 | -------------------------------------------------------------------------------- /src/admin/editor-config/editor-options/font-weight.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { useContext } from '@wordpress/element'; 6 | import { SelectControl, __experimentalHStack as HStack } from '@wordpress/components'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import { AdminContext } from '../../index'; 12 | import { EditorConfigContext } from '../index'; 13 | 14 | export default function FontWeight( { fontWeights } ) { 15 | const { editorOptions, setEditorOptions } = useContext( AdminContext ); 16 | const { searchQuery } = useContext( EditorConfigContext ); 17 | 18 | const title = __( 'Font weight', 'custom-html-block-extension' ); 19 | const isMatch = searchQuery && title.toLowerCase().includes( searchQuery.toLowerCase() ); 20 | 21 | if ( searchQuery && ! isMatch ) { 22 | return null; 23 | } 24 | 25 | const onChange = ( value ) => { 26 | setEditorOptions( { 27 | ...editorOptions, 28 | fontWeight: value, 29 | } ); 30 | }; 31 | 32 | return ( 33 | 34 | ( { 40 | label: fontWeight, 41 | value: fontWeight, 42 | } ) ) } 43 | onChange={ onChange } 44 | /> 45 | 46 | ); 47 | } 48 | -------------------------------------------------------------------------------- /src/admin/editor-config/editor-options/fast-scroll-sensitivity.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { useContext } from '@wordpress/element'; 6 | import { RangeControl } from '@wordpress/components'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import { AdminContext } from '../../index'; 12 | import { EditorConfigContext } from '../index'; 13 | import { toNumber } from '../../../lib/helper'; 14 | 15 | export default function FastScrollSensitivity() { 16 | const { editorOptions, setEditorOptions } = useContext( AdminContext ); 17 | const { searchQuery } = useContext( EditorConfigContext ); 18 | 19 | const title = __( 20 | 'Mouse wheel scroll speed (when pressing Alt key)', 21 | 'custom-html-block-extension' 22 | ); 23 | const isMatch = searchQuery && title.toLowerCase().includes( searchQuery.toLowerCase() ); 24 | 25 | if ( searchQuery && ! isMatch ) { 26 | return null; 27 | } 28 | 29 | const onChange = ( value ) => { 30 | setEditorOptions( { 31 | ...editorOptions, 32 | fastScrollSensitivity: value ? toNumber( value, 1, 10 ) : 5, 33 | } ); 34 | }; 35 | 36 | return ( 37 | 47 | ); 48 | } 49 | -------------------------------------------------------------------------------- /assets/css/source-code-pro.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: "Source Code Pro"; 3 | font-style: normal; 4 | font-weight: 200; 5 | font-stretch: normal; 6 | src: url(../fonts/SourceCodePro-ExtraLight.woff2) format("woff2"); 7 | } 8 | 9 | @font-face { 10 | font-family: "Source Code Pro"; 11 | font-style: normal; 12 | font-weight: 300; 13 | font-stretch: normal; 14 | src: url(../fonts/SourceCodePro-Light.woff2) format("woff2"); 15 | } 16 | 17 | @font-face { 18 | font-family: "Source Code Pro"; 19 | font-style: normal; 20 | font-weight: 400; 21 | font-stretch: normal; 22 | src: url(../fonts/SourceCodePro-Regular.woff2) format("woff2"); 23 | } 24 | 25 | @font-face { 26 | font-family: "Source Code Pro"; 27 | font-style: normal; 28 | font-weight: 500; 29 | font-stretch: normal; 30 | src: url(../fonts/SourceCodePro-Medium.woff2) format("woff2"); 31 | } 32 | 33 | @font-face { 34 | font-family: "Source Code Pro"; 35 | font-style: normal; 36 | font-weight: 600; 37 | font-stretch: normal; 38 | src: url(../fonts/SourceCodePro-Semibold.woff2) format("woff2"); 39 | } 40 | 41 | @font-face { 42 | font-family: "Source Code Pro"; 43 | font-style: normal; 44 | font-weight: 700; 45 | font-stretch: normal; 46 | src: url(../fonts/SourceCodePro-Bold.woff2) format("woff2"); 47 | } 48 | 49 | @font-face { 50 | font-family: "Source Code Pro"; 51 | font-style: normal; 52 | font-weight: 900; 53 | font-stretch: normal; 54 | src: url(../fonts/SourceCodePro-Black.woff2) format("woff2"); 55 | } 56 | -------------------------------------------------------------------------------- /src/admin/options/components/permission-user-role/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { useContext } from '@wordpress/element'; 6 | import { PanelBody, ToggleControl, __experimentalVStack as VStack } from '@wordpress/components'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import { AdminContext } from '../../../index'; 12 | 13 | export default function PermissionUserRole() { 14 | const { options, setOptions } = useContext( AdminContext ); 15 | 16 | const userRoles = window.chbeObj.userRoles || {}; 17 | 18 | const onChange = ( role ) => { 19 | const newPermissionRoles = options.permissionRoles.includes( role ) 20 | ? options.permissionRoles.filter( ( item ) => item !== role ) 21 | : [ ...options.permissionRoles, role ]; 22 | 23 | const newOptions = { 24 | ...options, 25 | permissionRoles: newPermissionRoles, 26 | }; 27 | 28 | setOptions( newOptions ); 29 | }; 30 | 31 | return ( 32 | 35 | 36 | { userRoles.map( ( role, index ) => ( 37 | onChange( role.value ) } 43 | /> 44 | ) ) } 45 | 46 | 47 | ); 48 | } 49 | -------------------------------------------------------------------------------- /src/admin/editor-config/editor-options/hover.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { useContext } from '@wordpress/element'; 6 | import { ToggleControl, __experimentalHStack as HStack } from '@wordpress/components'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import { AdminContext } from '../../index'; 12 | import { EditorConfigContext } from '../index'; 13 | import ItemHelp from '../components/item-help'; 14 | 15 | export default function Hover() { 16 | const { editorOptions, setEditorOptions } = useContext( AdminContext ); 17 | const { searchQuery } = useContext( EditorConfigContext ); 18 | 19 | const title = __( 'Enable hover hints', 'custom-html-block-extension' ); 20 | const isMatch = searchQuery && title.toLowerCase().includes( searchQuery.toLowerCase() ); 21 | 22 | if ( searchQuery && ! isMatch ) { 23 | return null; 24 | } 25 | 26 | const onChange = ( value ) => { 27 | setEditorOptions( { 28 | ...editorOptions, 29 | hover: value, 30 | } ); 31 | }; 32 | 33 | return ( 34 | 35 | 41 | 49 | 50 | ); 51 | } 52 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: [ 'plugin:@wordpress/eslint-plugin/recommended' ], 3 | parser: '@babel/eslint-parser', 4 | globals: { 5 | jQuery: true, 6 | }, 7 | rules: { 8 | 'react/jsx-boolean-value': 'error', 9 | 'react/jsx-curly-brace-presence': [ 'error', { props: 'never', children: 'never' } ], 10 | 'import/no-extraneous-dependencies': 'off', 11 | 'import/no-unresolved': 'off', 12 | '@wordpress/no-unsafe-wp-apis': 'off', 13 | '@wordpress/dependency-group': 'error', 14 | '@wordpress/i18n-text-domain': [ 15 | 'error', 16 | { 17 | allowedTextDomain: 'custom-html-block-extension', 18 | }, 19 | ], 20 | 'prettier/prettier': [ 21 | 'error', 22 | { 23 | useTabs: true, 24 | tabWidth: 2, 25 | singleQuote: true, 26 | printWidth: 100, 27 | bracketSpacing: true, 28 | parenSpacing: true, 29 | bracketSameLine: false, 30 | }, 31 | ], 32 | }, 33 | parserOptions: { 34 | requireConfigFile: false, 35 | babelOptions: { 36 | presets: [ '@babel/preset-react' ], 37 | }, 38 | }, 39 | overrides: [ 40 | { 41 | files: [ '**/test/**/*.js', '**/__tests__/**/*.js', '**/*.spec.js' ], 42 | extends: [ 'plugin:@wordpress/eslint-plugin/test-unit' ], 43 | settings: { 44 | jest: { 45 | version: 26, 46 | }, 47 | }, 48 | }, 49 | { 50 | files: [ 'test/e2e/**/*.js' ], 51 | extends: [ 'plugin:@wordpress/eslint-plugin/test-e2e' ], 52 | rules: { 53 | 'jest/expect-expect': 'off', 54 | }, 55 | }, 56 | ], 57 | }; 58 | -------------------------------------------------------------------------------- /src/admin/editor-config/editor-settings/theme.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { useContext } from '@wordpress/element'; 6 | import { SelectControl, __experimentalHStack as HStack } from '@wordpress/components'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import { AdminContext } from '../../index'; 12 | import { EditorConfigContext } from '../index'; 13 | import themes from '../../../lib/themes'; 14 | 15 | export default function Theme() { 16 | const { editorSettings, setEditorSettings } = useContext( AdminContext ); 17 | const { searchQuery } = useContext( EditorConfigContext ); 18 | 19 | const title = __( 'Theme', 'custom-html-block-extension' ); 20 | const isMatch = searchQuery && title.toLowerCase().includes( searchQuery.toLowerCase() ); 21 | 22 | if ( searchQuery && ! isMatch ) { 23 | return null; 24 | } 25 | 26 | const onChange = ( value ) => { 27 | setEditorSettings( { 28 | ...editorSettings, 29 | theme: value, 30 | } ); 31 | }; 32 | 33 | return ( 34 | 35 | 47 | 48 | ); 49 | } 50 | -------------------------------------------------------------------------------- /src/admin/editor-config/components/controls/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { useState } from '@wordpress/element'; 6 | import { 7 | Button, 8 | __experimentalConfirmDialog as ConfirmDialog, 9 | __experimentalHStack as HStack, 10 | } from '@wordpress/components'; 11 | 12 | export default function Controls( { isWaiting, onUpdateOptions, onResetOptions } ) { 13 | const [ isModalOpen, setIsModalOpen ] = useState( false ); 14 | 15 | return ( 16 | <> 17 | 18 | 26 | 34 | 35 | { isModalOpen && ( 36 | { 38 | onResetOptions(); 39 | setIsModalOpen( false ); 40 | } } 41 | onCancel={ () => setIsModalOpen( false ) } 42 | confirmButtonText={ __( 'Reset settings', 'custom-html-block-extension' ) } 43 | > 44 | { __( 45 | 'Are you sure that reset all settings to default values ?', 46 | 'custom-html-block-extension' 47 | ) } 48 | 49 | ) } 50 | 51 | ); 52 | } 53 | -------------------------------------------------------------------------------- /assets/css/source-code-pro-italic.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: "Source Code Pro Italic"; 3 | font-style: normal; 4 | font-weight: 200; 5 | font-stretch: normal; 6 | src: url(../fonts/SourceCodePro-ExtraLightIt.woff2) format("woff2"); 7 | } 8 | 9 | @font-face { 10 | font-family: "Source Code Pro Italic"; 11 | font-style: normal; 12 | font-weight: 300; 13 | font-stretch: normal; 14 | src: url(../fonts/SourceCodePro-LightIt.woff2) format("woff2"); 15 | } 16 | 17 | @font-face { 18 | font-family: "Source Code Pro Italic"; 19 | font-style: normal; 20 | font-weight: 400; 21 | font-stretch: normal; 22 | src: url(../fonts/SourceCodePro-It.woff2) format("woff2"); 23 | } 24 | 25 | @font-face { 26 | font-family: "Source Code Pro Italic"; 27 | font-style: normal; 28 | font-weight: 500; 29 | font-stretch: normal; 30 | src: url(../fonts/SourceCodePro-MediumIt.woff2) format("woff2"); 31 | } 32 | 33 | @font-face { 34 | font-family: "Source Code Pro Italic"; 35 | font-style: normal; 36 | font-weight: 600; 37 | font-stretch: normal; 38 | src: url(../fonts/SourceCodePro-SemiboldIt.woff2) format("woff2"); 39 | } 40 | 41 | @font-face { 42 | font-family: "Source Code Pro Italic"; 43 | font-style: normal; 44 | font-weight: 700; 45 | font-stretch: normal; 46 | src: url(../fonts/SourceCodePro-BoldIt.woff2) format("woff2"); 47 | } 48 | 49 | @font-face { 50 | font-family: "Source Code Pro Italic"; 51 | font-style: normal; 52 | font-weight: 900; 53 | font-stretch: normal; 54 | src: url(../fonts/SourceCodePro-BlackIt.woff2) format("woff2"); 55 | } 56 | -------------------------------------------------------------------------------- /src/components/monaco-editor/style.scss: -------------------------------------------------------------------------------- 1 | #monaco-editor { 2 | height: 100%; 3 | 4 | .find-widget { 5 | 6 | .button { 7 | color: inherit; 8 | background: none; 9 | background-color: transparent !important; 10 | min-height: auto; 11 | box-sizing: border-box; 12 | 13 | &:not(.toggle) { 14 | width: 22px; 15 | height: 22px; 16 | } 17 | 18 | &:not(:focus) { 19 | border: none; 20 | } 21 | 22 | &:focus { 23 | box-shadow: none; 24 | border: 1px solid; 25 | } 26 | 27 | &.disabled { 28 | color: inherit !important; 29 | background: none !important; 30 | } 31 | } 32 | 33 | textarea { 34 | min-height: initial; 35 | font-family: inherit; 36 | font-size: inherit; 37 | border: none; 38 | 39 | &:focus { 40 | box-shadow: none; 41 | } 42 | } 43 | } 44 | 45 | .find-part { 46 | margin-top: 4px; 47 | } 48 | 49 | .inputarea { 50 | padding: 0; 51 | color: inherit; 52 | box-shadow: none; 53 | 54 | &.monaco-mouse-cursor-text { 55 | min-height: auto; 56 | background: transparent; 57 | border: none; 58 | } 59 | } 60 | 61 | .monaco-custom-toggle:focus { 62 | border-color: inherit; 63 | outline: none; 64 | } 65 | 66 | .monaco-findInput > .controls { 67 | top: 2px; 68 | } 69 | 70 | .monaco-icon-label-container > .monaco-icon-name-container > .label-name { 71 | text-decoration: none; 72 | } 73 | 74 | .monaco-highlighted-label .highlight { 75 | display: inline; 76 | padding: 0; 77 | margin: 0; 78 | background: transparent; 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /src/lib/themes/spacecadet.json: -------------------------------------------------------------------------------- 1 | { 2 | "base": "vs-dark", 3 | "inherit": true, 4 | "rules": [ 5 | { 6 | "foreground": "473c45", 7 | "token": "comment" 8 | }, 9 | { 10 | "foreground": "805978", 11 | "token": "string" 12 | }, 13 | { 14 | "foreground": "a8885a", 15 | "token": "constant" 16 | }, 17 | { 18 | "foreground": "596380", 19 | "token": "variable.parameter" 20 | }, 21 | { 22 | "foreground": "596380", 23 | "token": "variable.other" 24 | }, 25 | { 26 | "foreground": "728059", 27 | "token": "keyword - keyword.operator" 28 | }, 29 | { 30 | "foreground": "728059", 31 | "token": "keyword.operator.logical" 32 | }, 33 | { 34 | "foreground": "9ebf60", 35 | "token": "storage" 36 | }, 37 | { 38 | "foreground": "6078bf", 39 | "token": "entity" 40 | }, 41 | { 42 | "fontStyle": "italic", 43 | "token": "entity.other.inherited-class" 44 | }, 45 | { 46 | "foreground": "8a4b66", 47 | "token": "support" 48 | }, 49 | { 50 | "foreground": "893062", 51 | "token": "support.type.exception" 52 | }, 53 | { 54 | "background": "5f0047", 55 | "token": "invalid" 56 | }, 57 | { 58 | "background": "371d28", 59 | "token": "meta.function.section" 60 | } 61 | ], 62 | "colors": { 63 | "editor.foreground": "#DDE6CF", 64 | "editor.background": "#0D0D0D", 65 | "editor.selectionBackground": "#40002F", 66 | "editor.lineHighlightBackground": "#00000012", 67 | "editorCursor.foreground": "#7F005D", 68 | "editorWhitespace.foreground": "#BFBFBF" 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /src/admin/editor-config/editor-options/drag-and-drop.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { useContext } from '@wordpress/element'; 6 | import { ToggleControl, __experimentalHStack as HStack } from '@wordpress/components'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import { AdminContext } from '../../index'; 12 | import { EditorConfigContext } from '../index'; 13 | import ItemHelp from '../components/item-help'; 14 | 15 | export default function DragAndDrop() { 16 | const { editorOptions, setEditorOptions } = useContext( AdminContext ); 17 | const { searchQuery } = useContext( EditorConfigContext ); 18 | 19 | const title = __( 'Moving selections via drag and drop', 'custom-html-block-extension' ); 20 | const isMatch = searchQuery && title.toLowerCase().includes( searchQuery.toLowerCase() ); 21 | 22 | if ( searchQuery && ! isMatch ) { 23 | return null; 24 | } 25 | 26 | const onChange = ( value ) => { 27 | setEditorOptions( { 28 | ...editorOptions, 29 | dragAndDrop: value, 30 | } ); 31 | }; 32 | 33 | return ( 34 | 35 | 41 | 49 | 50 | ); 51 | } 52 | -------------------------------------------------------------------------------- /src/lib/themes/idle.json: -------------------------------------------------------------------------------- 1 | { 2 | "base": "vs", 3 | "inherit": true, 4 | "rules": [ 5 | { 6 | "foreground": "919191", 7 | "token": "comment" 8 | }, 9 | { 10 | "foreground": "00a33f", 11 | "token": "string" 12 | }, 13 | { 14 | "foreground": "a535ae", 15 | "token": "constant.language" 16 | }, 17 | { 18 | "foreground": "ff5600", 19 | "token": "keyword" 20 | }, 21 | { 22 | "foreground": "ff5600", 23 | "token": "storage" 24 | }, 25 | { 26 | "foreground": "21439c", 27 | "token": "entity.name.type" 28 | }, 29 | { 30 | "foreground": "21439c", 31 | "token": "entity.name.function" 32 | }, 33 | { 34 | "foreground": "a535ae", 35 | "token": "support.function" 36 | }, 37 | { 38 | "foreground": "a535ae", 39 | "token": "support.constant" 40 | }, 41 | { 42 | "foreground": "a535ae", 43 | "token": "support.type" 44 | }, 45 | { 46 | "foreground": "a535ae", 47 | "token": "support.class" 48 | }, 49 | { 50 | "foreground": "a535ae", 51 | "token": "support.variable" 52 | }, 53 | { 54 | "foreground": "ffffff", 55 | "background": "990000", 56 | "token": "invalid" 57 | }, 58 | { 59 | "foreground": "990000", 60 | "token": "constant.other.placeholder.py" 61 | } 62 | ], 63 | "colors": { 64 | "editor.foreground": "#000000", 65 | "editor.background": "#FFFFFF", 66 | "editor.selectionBackground": "#BAD6FD", 67 | "editor.lineHighlightBackground": "#00000012", 68 | "editorCursor.foreground": "#000000", 69 | "editorWhitespace.foreground": "#BFBFBF" 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /src/admin/editor-config/editor-options/mouse-wheel-zoom.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { useContext } from '@wordpress/element'; 6 | import { ToggleControl, __experimentalHStack as HStack } from '@wordpress/components'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import { AdminContext } from '../../index'; 12 | import { EditorConfigContext } from '../index'; 13 | import ItemHelp from '../components/item-help'; 14 | 15 | export default function MouseWheelZoom() { 16 | const { editorOptions, setEditorOptions } = useContext( AdminContext ); 17 | const { searchQuery } = useContext( EditorConfigContext ); 18 | 19 | const title = __( 'Ctrl + mouse wheel to zoom in / out', 'custom-html-block-extension' ); 20 | const isMatch = searchQuery && title.toLowerCase().includes( searchQuery.toLowerCase() ); 21 | 22 | if ( searchQuery && ! isMatch ) { 23 | return null; 24 | } 25 | 26 | const onChange = ( value ) => { 27 | setEditorOptions( { 28 | ...editorOptions, 29 | mouseWheelZoom: value, 30 | } ); 31 | }; 32 | 33 | return ( 34 | 35 | 41 | 49 | 50 | ); 51 | } 52 | -------------------------------------------------------------------------------- /src/admin/editor-config/editor-options/line-numbers-min-chars.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { useContext } from '@wordpress/element'; 6 | import { RangeControl, __experimentalHStack as HStack } from '@wordpress/components'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import { AdminContext } from '../../index'; 12 | import { EditorConfigContext } from '../index'; 13 | import ItemHelp from '../components/item-help'; 14 | import { toNumber } from '../../../lib/helper'; 15 | 16 | export default function LineNumbersMinChars() { 17 | const { editorOptions, setEditorOptions } = useContext( AdminContext ); 18 | const { searchQuery } = useContext( EditorConfigContext ); 19 | 20 | const title = __( 'Line number width', 'custom-html-block-extension' ); 21 | const isMatch = searchQuery && title.toLowerCase().includes( searchQuery.toLowerCase() ); 22 | 23 | if ( searchQuery && ! isMatch ) { 24 | return null; 25 | } 26 | 27 | const onChange = ( value ) => { 28 | setEditorOptions( { 29 | ...editorOptions, 30 | lineNumbersMinChars: value ? toNumber( value, 1, 10 ) : 5, 31 | } ); 32 | }; 33 | 34 | return ( 35 | 36 | 46 | 47 | 48 | ); 49 | } 50 | -------------------------------------------------------------------------------- /src/admin/editor-config/editor-options/rulers.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { useContext } from '@wordpress/element'; 6 | import { RangeControl, __experimentalHStack as HStack } from '@wordpress/components'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import { AdminContext } from '../../index'; 12 | import { EditorConfigContext } from '../index'; 13 | import ItemHelp from '../components/item-help'; 14 | import { toNumber } from '../../../lib/helper'; 15 | 16 | export default function Rulers() { 17 | const { editorOptions, setEditorOptions } = useContext( AdminContext ); 18 | const { searchQuery } = useContext( EditorConfigContext ); 19 | 20 | const title = __( 'Vertical line position', 'custom-html-block-extension' ); 21 | const isMatch = searchQuery && title.toLowerCase().includes( searchQuery.toLowerCase() ); 22 | 23 | if ( searchQuery && ! isMatch ) { 24 | return null; 25 | } 26 | 27 | const onChange = ( value ) => { 28 | setEditorOptions( { 29 | ...editorOptions, 30 | rulers: 0 < value ? [ toNumber( value, 1, 80 ) ] : [], 31 | } ); 32 | }; 33 | 34 | return ( 35 | 36 | 46 | 47 | 48 | ); 49 | } 50 | -------------------------------------------------------------------------------- /src/admin/editor-config/editor-options/empty-selection-clipboard.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { useContext } from '@wordpress/element'; 6 | import { ToggleControl, __experimentalHStack as HStack } from '@wordpress/components'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import { AdminContext } from '../../index'; 12 | import { EditorConfigContext } from '../index'; 13 | import ItemHelp from '../components/item-help'; 14 | 15 | export default function EmptySelectionClipboard() { 16 | const { editorOptions, setEditorOptions } = useContext( AdminContext ); 17 | const { searchQuery } = useContext( EditorConfigContext ); 18 | 19 | const title = __( 'Copy the current line without selection', 'custom-html-block-extension' ); 20 | const isMatch = searchQuery && title.toLowerCase().includes( searchQuery.toLowerCase() ); 21 | 22 | if ( searchQuery && ! isMatch ) { 23 | return null; 24 | } 25 | 26 | const onChange = ( value ) => { 27 | setEditorOptions( { 28 | ...editorOptions, 29 | emptySelectionClipboard: value, 30 | } ); 31 | }; 32 | 33 | return ( 34 | 35 | 41 | 49 | 50 | ); 51 | } 52 | -------------------------------------------------------------------------------- /src/admin/editor-config/editor-options/minimap/max-column.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { useContext } from '@wordpress/element'; 6 | import { RangeControl, __experimentalHStack as HStack } from '@wordpress/components'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import { AdminContext } from '../../../index'; 12 | import { EditorConfigContext } from '../../index'; 13 | import ItemHelp from '../../components/item-help'; 14 | import { toNumber } from '../../../../lib/helper'; 15 | 16 | export default function MinimapMaxColumn() { 17 | const { editorOptions, setEditorOptions } = useContext( AdminContext ); 18 | const { searchQuery } = useContext( EditorConfigContext ); 19 | 20 | const title = __( 'Width', 'custom-html-block-extension' ); 21 | const isMatch = searchQuery && title.toLowerCase().includes( searchQuery.toLowerCase() ); 22 | 23 | if ( searchQuery && ! isMatch ) { 24 | return null; 25 | } 26 | 27 | const onChange = ( value ) => { 28 | setEditorOptions( { 29 | ...editorOptions, 30 | minimap: { 31 | ...editorOptions.minimap, 32 | maxColumn: value ? toNumber( value, 10, 60 ) : 60, 33 | }, 34 | } ); 35 | }; 36 | 37 | return ( 38 | 39 | 49 | 50 | 51 | ); 52 | } 53 | -------------------------------------------------------------------------------- /.wordpress-org/blueprints/blueprint.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://playground.wordpress.net/blueprint-schema.json", 3 | "landingPage": "/wp-admin/post.php?post=5&action=edit", 4 | "steps": [ 5 | { 6 | "step": "login", 7 | "username": "admin" 8 | }, 9 | { 10 | "step": "installPlugin", 11 | "pluginData": { 12 | "resource": "wordpress.org/plugins", 13 | "slug": "custom-html-block-extension" 14 | } 15 | }, 16 | { 17 | "step": "runPHP", 18 | "code": " 5,\n'post_title' => 'Custom HTML Block Extension',\n'post_content' => '\n
\n\t

Hello World

\n\t
\n\t\t
\n\t\t\t

Subtitle

\n\t\t\t\"WordPress\"\n\t\t\t

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

\n\t\t
\n\t\t
\n\t\t\t

Subtitle

\n\t\t\t\"WordPress\"\n\t\t\tWordPress.org\n\t\t
\n\t
\n
\n',\n'post_status' => 'publish',\n'post_author' => 1\n));" 19 | } 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /src/admin/editor-config/editor-options/word-wrap-column.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { useContext } from '@wordpress/element'; 6 | import { RangeControl, __experimentalHStack as HStack } from '@wordpress/components'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import { AdminContext } from '../../index'; 12 | import { EditorConfigContext } from '../index'; 13 | import ItemHelp from '../components/item-help'; 14 | import { toNumber } from '../../../lib/helper'; 15 | 16 | export default function WordWrapColumn() { 17 | const { editorOptions, setEditorOptions } = useContext( AdminContext ); 18 | const { searchQuery } = useContext( EditorConfigContext ); 19 | 20 | const title = __( 'Word wrap column', 'custom-html-block-extension' ); 21 | const isMatch = searchQuery && title.toLowerCase().includes( searchQuery.toLowerCase() ); 22 | 23 | if ( searchQuery && ! isMatch ) { 24 | return null; 25 | } 26 | 27 | const onChange = ( value ) => { 28 | setEditorOptions( { 29 | ...editorOptions, 30 | wordWrapColumn: value ? toNumber( value, 20, 200 ) : 80, 31 | } ); 32 | }; 33 | 34 | return ( 35 | 36 | 46 | 52 | 53 | ); 54 | } 55 | -------------------------------------------------------------------------------- /src/admin/editor-config/editor-options/line-decorations-width.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { useContext } from '@wordpress/element'; 6 | import { RangeControl, __experimentalHStack as HStack } from '@wordpress/components'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import { AdminContext } from '../../index'; 12 | import { EditorConfigContext } from '../index'; 13 | import ItemHelp from '../components/item-help'; 14 | import { toNumber } from '../../../lib/helper'; 15 | 16 | export default function LineDecorationsWidth() { 17 | const { editorOptions, setEditorOptions } = useContext( AdminContext ); 18 | const { searchQuery } = useContext( EditorConfigContext ); 19 | 20 | const title = __( 'Folding area width (px)', 'custom-html-block-extension' ); 21 | const isMatch = searchQuery && title.toLowerCase().includes( searchQuery.toLowerCase() ); 22 | 23 | if ( searchQuery && ! isMatch ) { 24 | return null; 25 | } 26 | 27 | const onChange = ( value ) => { 28 | setEditorOptions( { 29 | ...editorOptions, 30 | lineDecorationsWidth: value ? toNumber( value, 0, 30 ) : 0, 31 | } ); 32 | }; 33 | 34 | return ( 35 | 36 | 46 | 52 | 53 | ); 54 | } 55 | -------------------------------------------------------------------------------- /src/admin/editor-config/editor-options/unfold-on-click-after-end-of-line.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { useContext } from '@wordpress/element'; 6 | import { ToggleControl, __experimentalHStack as HStack } from '@wordpress/components'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import { AdminContext } from '../../index'; 12 | import { EditorConfigContext } from '../index'; 13 | import ItemHelp from '../components/item-help'; 14 | 15 | export default function UnfoldOnClickAfterEndOfLine() { 16 | const { editorOptions, setEditorOptions } = useContext( AdminContext ); 17 | const { searchQuery } = useContext( EditorConfigContext ); 18 | 19 | const title = __( 20 | 'Expand folding line when clicking on empty content after a folded line', 21 | 'custom-html-block-extension' 22 | ); 23 | const isMatch = searchQuery && title.toLowerCase().includes( searchQuery.toLowerCase() ); 24 | 25 | if ( searchQuery && ! isMatch ) { 26 | return null; 27 | } 28 | 29 | const onChange = ( value ) => { 30 | setEditorOptions( { 31 | ...editorOptions, 32 | unfoldOnClickAfterEndOfLine: value, 33 | } ); 34 | }; 35 | 36 | return ( 37 | 38 | 44 | 52 | 53 | ); 54 | } 55 | -------------------------------------------------------------------------------- /src/admin/editor-config/editor-options/minimap/scale.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { useContext } from '@wordpress/element'; 6 | import { RangeControl, __experimentalHStack as HStack } from '@wordpress/components'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import { AdminContext } from '../../../index'; 12 | import { EditorConfigContext } from '../../index'; 13 | import ItemHelp from '../../components/item-help'; 14 | import { toNumber } from '../../../../lib/helper'; 15 | 16 | export default function MinimapScale() { 17 | const { editorOptions, setEditorOptions } = useContext( AdminContext ); 18 | const { searchQuery } = useContext( EditorConfigContext ); 19 | 20 | const title = __( 'Scale', 'custom-html-block-extension' ); 21 | const isMatch = searchQuery && title.toLowerCase().includes( searchQuery.toLowerCase() ); 22 | 23 | if ( searchQuery && ! isMatch ) { 24 | return null; 25 | } 26 | 27 | const onChange = ( value ) => { 28 | setEditorOptions( { 29 | ...editorOptions, 30 | minimap: { 31 | ...editorOptions.minimap, 32 | scale: value ? toNumber( value, 1, 3 ) : 1, 33 | }, 34 | } ); 35 | }; 36 | 37 | return ( 38 | 39 | 49 | 55 | 56 | ); 57 | } 58 | -------------------------------------------------------------------------------- /src/admin/editor-config/editor-options/find/loop.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { useContext } from '@wordpress/element'; 6 | import { ToggleControl, __experimentalHStack as HStack } from '@wordpress/components'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import { AdminContext } from '../../../index'; 12 | import { EditorConfigContext } from '../../index'; 13 | import ItemHelp from '../../components/item-help'; 14 | 15 | export default function FindLoop() { 16 | const { editorOptions, setEditorOptions } = useContext( AdminContext ); 17 | const { searchQuery } = useContext( EditorConfigContext ); 18 | 19 | const title = __( 'Loop', 'custom-html-block-extension' ); 20 | const isMatch = searchQuery && title.toLowerCase().includes( searchQuery.toLowerCase() ); 21 | 22 | if ( searchQuery && ! isMatch ) { 23 | return null; 24 | } 25 | 26 | const onChange = ( value ) => { 27 | setEditorOptions( { 28 | ...editorOptions, 29 | find: { 30 | ...editorOptions.find, 31 | loop: value, 32 | }, 33 | } ); 34 | }; 35 | 36 | return ( 37 | 38 | 44 | 56 | 57 | ); 58 | } 59 | -------------------------------------------------------------------------------- /src/admin/style.scss: -------------------------------------------------------------------------------- 1 | // WordPress base styles 2 | @use "~@wordpress/base-styles/mixins" as mixins; 3 | @use "~@wordpress/base-styles/variables" as variables; 4 | @use "~@wordpress/base-styles/colors" as colors; 5 | 6 | // Components 7 | @use "./components/snackbars/style" as snackbars; 8 | @use "./components/header/style" as header; 9 | @use "./components/shortcut/style" as shortcut; 10 | @use "./components/welcome-guide/style" as welcomeGuide; 11 | 12 | // Monaco Editor common styles 13 | @use "../components/monaco-editor/style" as monacoEditor; 14 | 15 | @use "./editor-config/style" as editorConfig; 16 | 17 | @include mixins.wordpress-admin-schemes(); 18 | 19 | // WordPress admin 20 | .auto-fold #wpcontent { 21 | padding-left: 0; 22 | } 23 | 24 | #custom-html-block-extension-admin { 25 | 26 | // Container class 27 | .chbe-admin-container { 28 | position: relative; 29 | max-width: 1200px; 30 | padding: 0 variables.$grid-unit-20 + variables.$grid-unit-05; 31 | margin: 0 auto; 32 | } 33 | 34 | // Gutenberg component styles 35 | .components-disabled { 36 | opacity: 0.3; 37 | } 38 | 39 | .components-panel__body { 40 | background: colors.$white; 41 | } 42 | } 43 | 44 | .chbe-admin { 45 | position: relative; 46 | 47 | &.is-waiting { 48 | opacity: 0.3; 49 | } 50 | 51 | .chbe-admin__loading { 52 | position: fixed; 53 | top: 50%; 54 | left: 50%; 55 | z-index: 1; 56 | margin-left: 89px; 57 | 58 | .components-spinner { 59 | margin: 0; 60 | transform: scale(1.5); 61 | } 62 | } 63 | 64 | .chbe-admin__tab-panel .components-tab-panel__tabs { 65 | justify-content: center; 66 | margin-bottom: variables.$grid-unit-50; 67 | background: colors.$white; 68 | box-shadow: 0 1px 0 rgba(213, 213, 213, 0.5); 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /src/admin/editor-config/editor-options/find/seed-search-string-from-selection.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { useContext } from '@wordpress/element'; 6 | import { ToggleControl, __experimentalHStack as HStack } from '@wordpress/components'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import { AdminContext } from '../../../index'; 12 | import { EditorConfigContext } from '../../index'; 13 | import ItemHelp from '../../components/item-help'; 14 | 15 | export default function FindSeedSearchStringFromSelection() { 16 | const { editorOptions, setEditorOptions } = useContext( AdminContext ); 17 | const { searchQuery } = useContext( EditorConfigContext ); 18 | 19 | const title = __( 'Seed search string from selection', 'custom-html-block-extension' ); 20 | const isMatch = searchQuery && title.toLowerCase().includes( searchQuery.toLowerCase() ); 21 | 22 | if ( searchQuery && ! isMatch ) { 23 | return null; 24 | } 25 | 26 | const onChange = ( value ) => { 27 | setEditorOptions( { 28 | ...editorOptions, 29 | find: { 30 | ...editorOptions.find, 31 | seedSearchStringFromSelection: value, 32 | }, 33 | } ); 34 | }; 35 | 36 | return ( 37 | 38 | 44 | 52 | 53 | ); 54 | } 55 | -------------------------------------------------------------------------------- /classes/class-init.php: -------------------------------------------------------------------------------- 1 | load_classes(); 27 | } 28 | 29 | /** 30 | * Uninstallation process 31 | */ 32 | public static function plugin_uninstall() { 33 | foreach ( Settings::OPTION_NAME as $option_name ) { 34 | delete_option( $option_name ); 35 | } 36 | } 37 | 38 | /** 39 | * Add a link to this plugin settings page in plugin list 40 | */ 41 | public function add_action_links( $links ) { 42 | $link = '' . __( 'Settings', 'custom-html-block-extension' ) . ''; 43 | array_unshift( $links, $link ); 44 | return $links; 45 | } 46 | 47 | /** 48 | * Load classes 49 | */ 50 | public function load_classes() { 51 | require_once CHBE_PATH . '/classes/class-settings.php'; 52 | require_once CHBE_PATH . '/classes/class-admin.php'; 53 | require_once CHBE_PATH . '/classes/class-block-editor.php'; 54 | require_once CHBE_PATH . '/classes/class-classic-editor.php'; 55 | require_once CHBE_PATH . '/classes/class-theme-plugin-editor.php'; 56 | require_once CHBE_PATH . '/classes/class-api.php'; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/lib/themes/themelist.json: -------------------------------------------------------------------------------- 1 | { 2 | "active4d": "Active4D", 3 | "all-hallows-eve": "All Hallows Eve", 4 | "amy": "Amy", 5 | "birds-of-paradise": "Birds of Paradise", 6 | "blackboard": "Blackboard", 7 | "brilliance-black": "Brilliance Black", 8 | "brilliance-dull": "Brilliance Dull", 9 | "chrome-devtools": "Chrome DevTools", 10 | "clouds-midnight": "Clouds Midnight", 11 | "clouds": "Clouds", 12 | "cobalt": "Cobalt", 13 | "dawn": "Dawn", 14 | "dreamweaver": "Dreamweaver", 15 | "eiffel": "Eiffel", 16 | "espresso-libre": "Espresso Libre", 17 | "github": "GitHub", 18 | "idle": "IDLE", 19 | "katzenmilch": "Katzenmilch", 20 | "kuroir-theme": "Kuroir Theme", 21 | "lazy": "LAZY", 22 | "magicwb--amiga-": "MagicWB (Amiga)", 23 | "merbivore-soft": "Merbivore Soft", 24 | "merbivore": "Merbivore", 25 | "monokai-bright": "Monokai Bright", 26 | "monokai": "Monokai", 27 | "night-owl": "Night Owl", 28 | "oceanic-next": "Oceanic Next", 29 | "pastels-on-dark": "Pastels on Dark", 30 | "slush-and-poppies": "Slush and Poppies", 31 | "solarized-dark": "Solarized-dark", 32 | "solarized-light": "Solarized-light", 33 | "spacecadet": "SpaceCadet", 34 | "sunburst": "Sunburst", 35 | "textmate--mac-classic-": "Textmate (Mac Classic)", 36 | "tomorrow-night-blue": "Tomorrow-Night-Blue", 37 | "tomorrow-night-bright": "Tomorrow-Night-Bright", 38 | "tomorrow-night-eighties": "Tomorrow-Night-Eighties", 39 | "tomorrow-night": "Tomorrow-Night", 40 | "tomorrow": "Tomorrow", 41 | "twilight": "Twilight", 42 | "upstream-sunburst": "Upstream Sunburst", 43 | "vibrant-ink": "Vibrant Ink", 44 | "xcode-default": "Xcode_default", 45 | "zenburnesque": "Zenburnesque", 46 | "iplastic": "iPlastic", 47 | "idlefingers": "idleFingers", 48 | "krtheme": "krTheme", 49 | "monoindustrial": "monoindustrial" 50 | } 51 | -------------------------------------------------------------------------------- /src/admin/editor-config/editor-options/quick-suggestions.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { useContext } from '@wordpress/element'; 6 | import { ToggleControl, __experimentalHStack as HStack } from '@wordpress/components'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import { AdminContext } from '../../index'; 12 | import { EditorConfigContext } from '../index'; 13 | import ItemHelp from '../components/item-help'; 14 | 15 | export default function QuickSuggestions() { 16 | const { editorOptions, setEditorOptions } = useContext( AdminContext ); 17 | const { searchQuery } = useContext( EditorConfigContext ); 18 | 19 | const title = __( 'Enable suggest', 'custom-html-block-extension' ); 20 | const isMatch = searchQuery && title.toLowerCase().includes( searchQuery.toLowerCase() ); 21 | 22 | if ( searchQuery && ! isMatch ) { 23 | return null; 24 | } 25 | 26 | const onChange = ( value ) => { 27 | setEditorOptions( { 28 | ...editorOptions, 29 | quickSuggestions: value, 30 | suggestOnTriggerCharacters: value, 31 | } ); 32 | }; 33 | 34 | return ( 35 | 36 | 42 | 54 | 55 | ); 56 | } 57 | -------------------------------------------------------------------------------- /src/admin/options/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import apiFetch from '@wordpress/api-fetch'; 6 | import { createContext, useContext } from '@wordpress/element'; 7 | import { Button, Flex, __experimentalVStack as VStack } from '@wordpress/components'; 8 | import { useDispatch } from '@wordpress/data'; 9 | import { store as noticesStore } from '@wordpress/notices'; 10 | 11 | /** 12 | * Internal dependencies 13 | */ 14 | import { AdminContext } from '../index'; 15 | import PermissionEditor from './components/permission-editor'; 16 | import PermissionUserRole from './components/permission-user-role'; 17 | 18 | /** 19 | * Context 20 | */ 21 | export const OptionsContext = createContext(); 22 | 23 | export default function Options() { 24 | const { isWaiting, options, setIsWaiting } = useContext( AdminContext ); 25 | const { createNotice } = useDispatch( noticesStore ); 26 | 27 | // Update editor config. 28 | const onUpdateOptions = () => { 29 | setIsWaiting( true ); 30 | 31 | apiFetch( { 32 | path: '/custom-html-block-extension/v1/update_options', 33 | method: 'POST', 34 | data: { options }, 35 | } ).then( ( response ) => { 36 | setTimeout( () => { 37 | createNotice( response.success ? 'success' : 'error', response.message, { 38 | type: 'snackbar', 39 | } ); 40 | setIsWaiting( false ); 41 | }, 600 ); 42 | } ); 43 | }; 44 | 45 | return ( 46 | 47 | 48 | 49 | 50 | 58 | 59 | 60 | ); 61 | } 62 | -------------------------------------------------------------------------------- /src/admin/editor-config/editor-options/padding/top.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { useContext } from '@wordpress/element'; 6 | import { RangeControl, __experimentalHStack as HStack } from '@wordpress/components'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import { AdminContext } from '../../../index'; 12 | import { EditorConfigContext } from '../../index'; 13 | import ItemHelp from '../../components/item-help'; 14 | import { toNumber } from '../../../../lib/helper'; 15 | 16 | export default function PaddingTop() { 17 | const { editorOptions, setEditorOptions } = useContext( AdminContext ); 18 | const { searchQuery } = useContext( EditorConfigContext ); 19 | 20 | const title = __( 'Padding top (px)', 'custom-html-block-extension' ); 21 | 22 | const isMatch = searchQuery && title.toLowerCase().includes( searchQuery.toLowerCase() ); 23 | 24 | if ( searchQuery && ! isMatch ) { 25 | return null; 26 | } 27 | 28 | const onChange = ( value ) => { 29 | setEditorOptions( { 30 | ...editorOptions, 31 | padding: { 32 | ...editorOptions.padding, 33 | top: value ? toNumber( value, 0, 50 ) : 0, 34 | }, 35 | } ); 36 | }; 37 | 38 | return ( 39 | 40 | 50 | 59 | 60 | ); 61 | } 62 | -------------------------------------------------------------------------------- /src/admin/editor-config/editor-options/links.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { useContext } from '@wordpress/element'; 6 | import { ToggleControl, __experimentalHStack as HStack } from '@wordpress/components'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import { AdminContext } from '../../index'; 12 | import { EditorConfigContext } from '../index'; 13 | import ItemHelp from '../components/item-help'; 14 | 15 | export default function Links() { 16 | const { editorOptions, setEditorOptions } = useContext( AdminContext ); 17 | const { searchQuery } = useContext( EditorConfigContext ); 18 | 19 | const title = __( 20 | 'Enable detecting links and making them clickable', 21 | 'custom-html-block-extension' 22 | ); 23 | const isMatch = searchQuery && title.toLowerCase().includes( searchQuery.toLowerCase() ); 24 | 25 | if ( searchQuery && ! isMatch ) { 26 | return null; 27 | } 28 | 29 | const onChange = ( value ) => { 30 | setEditorOptions( { 31 | ...editorOptions, 32 | links: value, 33 | } ); 34 | }; 35 | 36 | return ( 37 | 38 | 44 | 62 | 63 | ); 64 | } 65 | -------------------------------------------------------------------------------- /src/admin/editor-config/editor-options/scrollbar/scroll-by-page.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { useContext } from '@wordpress/element'; 6 | import { ToggleControl, __experimentalHStack as HStack } from '@wordpress/components'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import { AdminContext } from '../../../index'; 12 | import { EditorConfigContext } from '../../index'; 13 | import ItemHelp from '../../components/item-help'; 14 | 15 | export default function ScrollbarScrollByPage() { 16 | const { editorOptions, setEditorOptions } = useContext( AdminContext ); 17 | const { onRefreshEditor, searchQuery } = useContext( EditorConfigContext ); 18 | 19 | const title = __( 'Scroll by page', 'custom-html-block-extension' ); 20 | const isMatch = searchQuery && title.toLowerCase().includes( searchQuery.toLowerCase() ); 21 | 22 | if ( searchQuery && ! isMatch ) { 23 | return null; 24 | } 25 | 26 | const onChange = ( value ) => { 27 | onRefreshEditor(); 28 | setEditorOptions( { 29 | ...editorOptions, 30 | scrollbar: { 31 | ...editorOptions.scrollbar, 32 | scrollByPage: value, 33 | }, 34 | } ); 35 | }; 36 | 37 | return ( 38 | 39 | 45 | 57 | 58 | ); 59 | } 60 | -------------------------------------------------------------------------------- /src/admin/editor-config/editor-options/accept-suggestion-on-enter.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { createInterpolateElement, useContext } from '@wordpress/element'; 6 | import { ToggleControl, __experimentalHStack as HStack } from '@wordpress/components'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import { AdminContext } from '../../index'; 12 | import { EditorConfigContext } from '../index'; 13 | import ItemHelp from '../components/item-help'; 14 | 15 | export default function AcceptSuggestionOnEnter() { 16 | const { editorOptions, setEditorOptions } = useContext( AdminContext ); 17 | const { searchQuery } = useContext( EditorConfigContext ); 18 | 19 | const title = __( 'Accept suggestions on enter key', 'custom-html-block-extension' ); 20 | const isMatch = searchQuery && title.toLowerCase().includes( searchQuery.toLowerCase() ); 21 | 22 | if ( searchQuery && ! isMatch ) { 23 | return null; 24 | } 25 | 26 | const onChange = ( value ) => { 27 | setEditorOptions( { 28 | ...editorOptions, 29 | acceptSuggestionOnEnter: value, 30 | } ); 31 | }; 32 | 33 | return ( 34 | 35 | 41 | Enter key in addition to Tab key.', 47 | 'custom-html-block-extension' 48 | ), 49 | { 50 | code: , 51 | } 52 | ) } 53 | isToggle 54 | defaultToggle 55 | value={ editorOptions.acceptSuggestionOnEnter } 56 | /> 57 | 58 | ); 59 | } 60 | -------------------------------------------------------------------------------- /src/admin/editor-config/editor-options/folding.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { useContext } from '@wordpress/element'; 6 | import { ToggleControl, __experimentalHStack as HStack } from '@wordpress/components'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import { AdminContext } from '../../index'; 12 | import { EditorConfigContext } from '../index'; 13 | import ItemHelp from '../components/item-help'; 14 | 15 | export default function Folding() { 16 | const { editorOptions, setEditorOptions } = useContext( AdminContext ); 17 | const { searchQuery } = useContext( EditorConfigContext ); 18 | 19 | const title = __( 'Enable code folding', 'custom-html-block-extension' ); 20 | const isMatch = searchQuery && title.toLowerCase().includes( searchQuery.toLowerCase() ); 21 | 22 | if ( searchQuery && ! isMatch ) { 23 | return null; 24 | } 25 | 26 | const onChange = ( value ) => { 27 | setEditorOptions( { 28 | ...editorOptions, 29 | folding: value, 30 | } ); 31 | }; 32 | 33 | return ( 34 | 35 | 41 | 53 | 54 | ); 55 | } 56 | -------------------------------------------------------------------------------- /src/admin/editor-config/editor-options/format-on-paste.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { useContext } from '@wordpress/element'; 6 | import { ToggleControl, __experimentalHStack as HStack } from '@wordpress/components'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import { AdminContext } from '../../index'; 12 | import { EditorConfigContext } from '../index'; 13 | import ItemHelp from '../components/item-help'; 14 | 15 | export default function FormatOnPaste() { 16 | const { editorOptions, setEditorOptions } = useContext( AdminContext ); 17 | const { searchQuery } = useContext( EditorConfigContext ); 18 | 19 | const title = __( 'Enable format on paste', 'custom-html-block-extension' ); 20 | const isMatch = searchQuery && title.toLowerCase().includes( searchQuery.toLowerCase() ); 21 | 22 | if ( searchQuery && ! isMatch ) { 23 | return null; 24 | } 25 | 26 | const onChange = ( value ) => { 27 | setEditorOptions( { 28 | ...editorOptions, 29 | formatOnPaste: value, 30 | } ); 31 | }; 32 | 33 | return ( 34 | 35 | 41 | 59 | 60 | ); 61 | } 62 | -------------------------------------------------------------------------------- /src/admin/editor-config/editor-options/smooth-scrolling.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { useContext } from '@wordpress/element'; 6 | import { ToggleControl, __experimentalHStack as HStack } from '@wordpress/components'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import { AdminContext } from '../../index'; 12 | import { EditorConfigContext } from '../index'; 13 | import ItemHelp from '../components/item-help'; 14 | 15 | export default function SmoothScrolling() { 16 | const { editorOptions, setEditorOptions } = useContext( AdminContext ); 17 | const { searchQuery } = useContext( EditorConfigContext ); 18 | 19 | const title = __( 'Enable smooth scroll', 'custom-html-block-extension' ); 20 | const isMatch = searchQuery && title.toLowerCase().includes( searchQuery.toLowerCase() ); 21 | 22 | if ( searchQuery && ! isMatch ) { 23 | return null; 24 | } 25 | 26 | const onChange = ( value ) => { 27 | setEditorOptions( { 28 | ...editorOptions, 29 | smoothScrolling: value, 30 | } ); 31 | }; 32 | 33 | return ( 34 | 35 | 41 | 59 | 60 | ); 61 | } 62 | -------------------------------------------------------------------------------- /src/admin/editor-config/editor-options/rounded-selection.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { useContext } from '@wordpress/element'; 6 | import { ToggleControl, __experimentalHStack as HStack } from '@wordpress/components'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import { AdminContext } from '../../index'; 12 | import { EditorConfigContext } from '../index'; 13 | import ItemHelp from '../components/item-help'; 14 | 15 | export default function RoundedSelection() { 16 | const { editorOptions, setEditorOptions } = useContext( AdminContext ); 17 | const { searchQuery } = useContext( EditorConfigContext ); 18 | 19 | const title = __( 'Rounding corners of selection', 'custom-html-block-extension' ); 20 | const isMatch = searchQuery && title.toLowerCase().includes( searchQuery.toLowerCase() ); 21 | 22 | if ( searchQuery && ! isMatch ) { 23 | return null; 24 | } 25 | 26 | const onChange = ( value ) => { 27 | setEditorOptions( { 28 | ...editorOptions, 29 | roundedSelection: value, 30 | } ); 31 | }; 32 | 33 | return ( 34 | 35 | 41 | 59 | 60 | ); 61 | } 62 | -------------------------------------------------------------------------------- /src/admin/editor-config/editor-options/folding-highlight.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { useContext } from '@wordpress/element'; 6 | import { ToggleControl, __experimentalHStack as HStack } from '@wordpress/components'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import { AdminContext } from '../../index'; 12 | import { EditorConfigContext } from '../index'; 13 | import ItemHelp from '../components/item-help'; 14 | 15 | export default function FoldingHighlight() { 16 | const { editorOptions, setEditorOptions } = useContext( AdminContext ); 17 | const { searchQuery } = useContext( EditorConfigContext ); 18 | 19 | const title = __( 'Enable highlight for folded codes', 'custom-html-block-extension' ); 20 | const isMatch = searchQuery && title.toLowerCase().includes( searchQuery.toLowerCase() ); 21 | 22 | if ( searchQuery && ! isMatch ) { 23 | return null; 24 | } 25 | 26 | const onChange = ( value ) => { 27 | setEditorOptions( { 28 | ...editorOptions, 29 | foldingHighlight: value, 30 | } ); 31 | }; 32 | 33 | return ( 34 | 35 | 41 | 59 | 60 | ); 61 | } 62 | -------------------------------------------------------------------------------- /src/admin/editor-config/editor-options/sticky-tab-stops.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { useContext } from '@wordpress/element'; 6 | import { ToggleControl, __experimentalHStack as HStack } from '@wordpress/components'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import { AdminContext } from '../../index'; 12 | import { EditorConfigContext } from '../index'; 13 | import ItemHelp from '../components/item-help'; 14 | 15 | export default function StickyTabStops() { 16 | const { editorOptions, setEditorOptions } = useContext( AdminContext ); 17 | const { searchQuery } = useContext( EditorConfigContext ); 18 | 19 | const title = __( 'Select according to spaces for indentation', 'custom-html-block-extension' ); 20 | const isMatch = searchQuery && title.toLowerCase().includes( searchQuery.toLowerCase() ); 21 | 22 | if ( searchQuery && ! isMatch ) { 23 | return null; 24 | } 25 | 26 | const onChange = ( value ) => { 27 | setEditorOptions( { 28 | ...editorOptions, 29 | stickyTabStops: value, 30 | } ); 31 | }; 32 | 33 | return ( 34 | 35 | 41 | 59 | 60 | ); 61 | } 62 | -------------------------------------------------------------------------------- /src/admin/editor-config/editor-options/render-indent-guides.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { useContext } from '@wordpress/element'; 6 | import { ToggleControl, __experimentalHStack as HStack } from '@wordpress/components'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import { AdminContext } from '../../index'; 12 | import { EditorConfigContext } from '../index'; 13 | import ItemHelp from '../components/item-help'; 14 | 15 | export default function RenderIndentGuides() { 16 | const { editorOptions, setEditorOptions } = useContext( AdminContext ); 17 | const { searchQuery } = useContext( EditorConfigContext ); 18 | 19 | const title = __( 'Show indent guides', 'custom-html-block-extension' ); 20 | const isMatch = searchQuery && title.toLowerCase().includes( searchQuery.toLowerCase() ); 21 | 22 | if ( searchQuery && ! isMatch ) { 23 | return null; 24 | } 25 | 26 | const onChange = ( value ) => { 27 | setEditorOptions( { 28 | ...editorOptions, 29 | renderIndentGuides: value, 30 | } ); 31 | }; 32 | 33 | return ( 34 | 35 | 41 | 59 | 60 | ); 61 | } 62 | -------------------------------------------------------------------------------- /src/admin/editor-config/editor-options/use-tab-stops.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { useContext } from '@wordpress/element'; 6 | import { ToggleControl, __experimentalHStack as HStack } from '@wordpress/components'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import { AdminContext } from '../../index'; 12 | import { EditorConfigContext } from '../index'; 13 | import ItemHelp from '../components/item-help'; 14 | 15 | export default function UseTabStops() { 16 | const { editorOptions, setEditorOptions } = useContext( AdminContext ); 17 | const { searchQuery } = useContext( EditorConfigContext ); 18 | 19 | const title = __( 20 | 'Insert or delete whitespace according to tab position', 21 | 'custom-html-block-extension' 22 | ); 23 | const isMatch = searchQuery && title.toLowerCase().includes( searchQuery.toLowerCase() ); 24 | 25 | if ( searchQuery && ! isMatch ) { 26 | return null; 27 | } 28 | 29 | const onChange = ( value ) => { 30 | setEditorOptions( { 31 | ...editorOptions, 32 | useTabStops: value, 33 | } ); 34 | }; 35 | 36 | return ( 37 | 38 | 44 | 62 | 63 | ); 64 | } 65 | -------------------------------------------------------------------------------- /src/admin/editor-config/components/editor-preview/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __, sprintf } from '@wordpress/i18n'; 5 | import { useContext } from '@wordpress/element'; 6 | import { useDispatch } from '@wordpress/data'; 7 | import { store as noticesStore } from '@wordpress/notices'; 8 | 9 | /** 10 | * Internal dependencies 11 | */ 12 | import { AdminContext } from '../../../index'; 13 | import MonacoEditor from '../../../../components/monaco-editor'; 14 | 15 | export default function EditorPreview( { isEditorDisabled, setFontWeights } ) { 16 | const { code, setCode, editorSettings, editorOptions, setEditorOptions } = 17 | useContext( AdminContext ); 18 | const { createErrorNotice } = useDispatch( noticesStore ); 19 | 20 | const onFontLoad = ( { isSuccess, font } ) => { 21 | if ( ! isSuccess ) { 22 | createErrorNotice( 23 | sprintf( 24 | /* translators: %s is replaced with the font family name. */ 25 | __( 'Failed to load the font. (%s)', 'custom-html-block-extension' ), 26 | font.label 27 | ) 28 | ); 29 | setFontWeights( [ 300, 400, 500, 600, 700 ] ); 30 | setEditorOptions( { 31 | ...editorOptions, 32 | fontFamily: 'Fira Code', 33 | fontWeight: 300, 34 | } ); 35 | } else { 36 | setFontWeights( font.weight ); 37 | setEditorOptions( { 38 | ...editorOptions, 39 | } ); 40 | } 41 | }; 42 | 43 | return ( 44 |
45 | { ! isEditorDisabled && ( 46 | 57 | ) } 58 |
59 | ); 60 | } 61 | -------------------------------------------------------------------------------- /src/admin/editor-config/editor-options/minimap/enabled.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { useContext } from '@wordpress/element'; 6 | import { ToggleControl, __experimentalHStack as HStack } from '@wordpress/components'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import { AdminContext } from '../../../index'; 12 | import { EditorConfigContext } from '../../index'; 13 | import ItemHelp from '../../components/item-help'; 14 | 15 | export default function MinimapEnabled() { 16 | const { editorOptions, setEditorOptions } = useContext( AdminContext ); 17 | const { searchQuery } = useContext( EditorConfigContext ); 18 | 19 | const title = __( 'Enable minimap', 'custom-html-block-extension' ); 20 | const isMatch = searchQuery && title.toLowerCase().includes( searchQuery.toLowerCase() ); 21 | 22 | if ( searchQuery && ! isMatch ) { 23 | return null; 24 | } 25 | 26 | const onChange = ( value ) => { 27 | setEditorOptions( { 28 | ...editorOptions, 29 | minimap: { 30 | ...editorOptions.minimap, 31 | enabled: value, 32 | }, 33 | } ); 34 | }; 35 | 36 | return ( 37 | 38 | 44 | 56 | 57 | ); 58 | } 59 | -------------------------------------------------------------------------------- /src/admin/editor-config/editor-options/overview-ruler-border.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { useContext } from '@wordpress/element'; 6 | import { ToggleControl, __experimentalHStack as HStack } from '@wordpress/components'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import { AdminContext } from '../../index'; 12 | import { EditorConfigContext } from '../index'; 13 | import ItemHelp from '../components/item-help'; 14 | 15 | export default function OverviewRulerBorder() { 16 | const { editorOptions, setEditorOptions } = useContext( AdminContext ); 17 | const { searchQuery } = useContext( EditorConfigContext ); 18 | 19 | const title = __( 'Show border on scrollbar', 'custom-html-block-extension' ); 20 | const isMatch = searchQuery && title.toLowerCase().includes( searchQuery.toLowerCase() ); 21 | 22 | if ( searchQuery && ! isMatch ) { 23 | return null; 24 | } 25 | 26 | const onChange = ( value ) => { 27 | setEditorOptions( { 28 | ...editorOptions, 29 | overviewRulerBorder: value, 30 | } ); 31 | }; 32 | 33 | return ( 34 | 35 | 41 | 59 | 60 | ); 61 | } 62 | -------------------------------------------------------------------------------- /src/admin/editor-config/editor-options/occurrences-highlight.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { useContext } from '@wordpress/element'; 6 | import { ToggleControl, __experimentalHStack as HStack } from '@wordpress/components'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import { AdminContext } from '../../index'; 12 | import { EditorConfigContext } from '../index'; 13 | import ItemHelp from '../components/item-help'; 14 | 15 | export default function OccurrencesHighlight() { 16 | const { editorOptions, setEditorOptions } = useContext( AdminContext ); 17 | const { searchQuery } = useContext( EditorConfigContext ); 18 | 19 | const title = __( 'Highlight matching tag', 'custom-html-block-extension' ); 20 | const isMatch = searchQuery && title.toLowerCase().includes( searchQuery.toLowerCase() ); 21 | 22 | if ( searchQuery && ! isMatch ) { 23 | return null; 24 | } 25 | 26 | const onChange = ( value ) => { 27 | setEditorOptions( { 28 | ...editorOptions, 29 | occurrencesHighlight: value, 30 | } ); 31 | }; 32 | 33 | return ( 34 | 35 | 41 | 59 | 60 | ); 61 | } 62 | -------------------------------------------------------------------------------- /src/admin/editor-config/editor-options/scroll-beyond-last-line.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { useContext } from '@wordpress/element'; 6 | import { ToggleControl, __experimentalHStack as HStack } from '@wordpress/components'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import { AdminContext } from '../../index'; 12 | import { EditorConfigContext } from '../index'; 13 | import ItemHelp from '../components/item-help'; 14 | 15 | export default function ScrollBeyondLastLine() { 16 | const { editorOptions, setEditorOptions } = useContext( AdminContext ); 17 | const { searchQuery } = useContext( EditorConfigContext ); 18 | 19 | const title = __( 'Scroll past the last line', 'custom-html-block-extension' ); 20 | const isMatch = searchQuery && title.toLowerCase().includes( searchQuery.toLowerCase() ); 21 | 22 | if ( searchQuery && ! isMatch ) { 23 | return null; 24 | } 25 | 26 | const onChange = ( value ) => { 27 | setEditorOptions( { 28 | ...editorOptions, 29 | scrollBeyondLastLine: value, 30 | } ); 31 | }; 32 | 33 | return ( 34 | 35 | 41 | 59 | 60 | ); 61 | } 62 | -------------------------------------------------------------------------------- /src/admin/editor-config/editor-options/selection-highlight.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { useContext } from '@wordpress/element'; 6 | import { ToggleControl, __experimentalHStack as HStack } from '@wordpress/components'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import { AdminContext } from '../../index'; 12 | import { EditorConfigContext } from '../index'; 13 | import ItemHelp from '../components/item-help'; 14 | 15 | export default function SelectionHighlight() { 16 | const { editorOptions, setEditorOptions } = useContext( AdminContext ); 17 | const { searchQuery } = useContext( EditorConfigContext ); 18 | 19 | const title = __( 'Highlight all occurrences of a selected word', 'custom-html-block-extension' ); 20 | const isMatch = searchQuery && title.toLowerCase().includes( searchQuery.toLowerCase() ); 21 | 22 | if ( searchQuery && ! isMatch ) { 23 | return null; 24 | } 25 | 26 | const onChange = ( value ) => { 27 | setEditorOptions( { 28 | ...editorOptions, 29 | selectionHighlight: value, 30 | } ); 31 | }; 32 | 33 | return ( 34 | 35 | 41 | 59 | 60 | ); 61 | } 62 | -------------------------------------------------------------------------------- /src/admin/options/components/permission-editor/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { useContext } from '@wordpress/element'; 6 | import { PanelBody, ToggleControl, __experimentalVStack as VStack } from '@wordpress/components'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import { AdminContext } from '../../../index'; 12 | 13 | export default function PermissionEditor() { 14 | const { options, setOptions } = useContext( AdminContext ); 15 | 16 | const onBlockEditorChange = ( value ) => { 17 | setOptions( { 18 | ...options, 19 | permissionBlockEditor: value, 20 | } ); 21 | }; 22 | 23 | const onClassicEditorChange = ( value ) => { 24 | setOptions( { 25 | ...options, 26 | permissionClassicEditor: value, 27 | } ); 28 | }; 29 | 30 | const onThemePluginEditorChange = ( value ) => { 31 | setOptions( { 32 | ...options, 33 | permissionThemePluginEditor: value, 34 | } ); 35 | }; 36 | 37 | return ( 38 | 41 | 42 | 48 | 54 | 60 | 61 | 62 | ); 63 | } 64 | -------------------------------------------------------------------------------- /src/admin/editor-config/editor-options/suggest/show-icons.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { useContext } from '@wordpress/element'; 6 | import { ToggleControl, __experimentalHStack as HStack } from '@wordpress/components'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import { AdminContext } from '../../../index'; 12 | import { EditorConfigContext } from '../../index'; 13 | import ItemHelp from '../../components/item-help'; 14 | 15 | export default function SuggestShowIcons() { 16 | const { editorOptions, setEditorOptions } = useContext( AdminContext ); 17 | const { searchQuery } = useContext( EditorConfigContext ); 18 | 19 | const title = __( 'Show icons', 'custom-html-block-extension' ); 20 | const isMatch = searchQuery && title.toLowerCase().includes( searchQuery.toLowerCase() ); 21 | 22 | if ( searchQuery && ! isMatch ) { 23 | return null; 24 | } 25 | 26 | const onChange = ( value ) => { 27 | setEditorOptions( { 28 | ...editorOptions, 29 | suggest: { 30 | ...editorOptions.suggest, 31 | showIcons: value, 32 | }, 33 | } ); 34 | }; 35 | 36 | return ( 37 | 38 | 44 | 62 | 63 | ); 64 | } 65 | -------------------------------------------------------------------------------- /src/admin/editor-config/editor-options/render-control-characters.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { useContext } from '@wordpress/element'; 6 | import { ToggleControl, __experimentalHStack as HStack } from '@wordpress/components'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import { AdminContext } from '../../index'; 12 | import { EditorConfigContext } from '../index'; 13 | import ItemHelp from '../components/item-help'; 14 | 15 | export default function RenderControlCharacters() { 16 | const { editorOptions, setEditorOptions } = useContext( AdminContext ); 17 | const { searchQuery } = useContext( EditorConfigContext ); 18 | 19 | const title = __( 'Show rendering of control characters', 'custom-html-block-extension' ); 20 | const isMatch = searchQuery && title.toLowerCase().includes( searchQuery.toLowerCase() ); 21 | 22 | if ( searchQuery && ! isMatch ) { 23 | return null; 24 | } 25 | 26 | const onChange = ( value ) => { 27 | setEditorOptions( { 28 | ...editorOptions, 29 | renderControlCharacters: value, 30 | } ); 31 | }; 32 | 33 | return ( 34 | 35 | 41 | 59 | 60 | ); 61 | } 62 | -------------------------------------------------------------------------------- /src/admin/editor-config/editor-options/padding/bottom.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { useContext } from '@wordpress/element'; 6 | import { RangeControl, __experimentalHStack as HStack } from '@wordpress/components'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import { AdminContext } from '../../../index'; 12 | import { EditorConfigContext } from '../../index'; 13 | import ItemHelp from '../../components/item-help'; 14 | import { toNumber } from '../../../../lib/helper'; 15 | 16 | export default function PaddingBottom() { 17 | const { editorOptions, setEditorOptions } = useContext( AdminContext ); 18 | const { searchQuery } = useContext( EditorConfigContext ); 19 | 20 | const title = __( 'Padding bottom (px)', 'custom-html-block-extension' ); 21 | 22 | const isMatch = searchQuery && title.toLowerCase().includes( searchQuery.toLowerCase() ); 23 | 24 | if ( searchQuery && ! isMatch ) { 25 | return null; 26 | } 27 | 28 | const onChange = ( value ) => { 29 | setEditorOptions( { 30 | ...editorOptions, 31 | padding: { 32 | ...editorOptions.padding, 33 | bottom: value ? toNumber( value, 0, 50 ) : 0, 34 | }, 35 | } ); 36 | }; 37 | 38 | return ( 39 | 40 | 50 | 59 | 60 | ); 61 | } 62 | -------------------------------------------------------------------------------- /src/admin/editor-config/editor-options/render-final-newline.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { useContext } from '@wordpress/element'; 6 | import { ToggleControl, __experimentalHStack as HStack } from '@wordpress/components'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import { AdminContext } from '../../index'; 12 | import { EditorConfigContext } from '../index'; 13 | import ItemHelp from '../components/item-help'; 14 | 15 | export default function RenderFinalNewline() { 16 | const { editorOptions, setEditorOptions } = useContext( AdminContext ); 17 | const { searchQuery } = useContext( EditorConfigContext ); 18 | 19 | const title = __( 20 | 'Render last line number when the file ends with a newline', 21 | 'custom-html-block-extension' 22 | ); 23 | const isMatch = searchQuery && title.toLowerCase().includes( searchQuery.toLowerCase() ); 24 | 25 | if ( searchQuery && ! isMatch ) { 26 | return null; 27 | } 28 | 29 | const onChange = ( value ) => { 30 | setEditorOptions( { 31 | ...editorOptions, 32 | renderFinalNewline: value, 33 | } ); 34 | }; 35 | 36 | return ( 37 | 38 | 44 | 62 | 63 | ); 64 | } 65 | -------------------------------------------------------------------------------- /src/admin/editor-config/editor-options/cursor-smooth-caret-animation.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { useContext } from '@wordpress/element'; 6 | import { ToggleControl, __experimentalHStack as HStack } from '@wordpress/components'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import { AdminContext } from '../../index'; 12 | import { EditorConfigContext } from '../index'; 13 | import ItemHelp from '../components/item-help'; 14 | 15 | export default function CursorSmoothCaretAnimation() { 16 | const { editorOptions, setEditorOptions } = useContext( AdminContext ); 17 | const { searchQuery } = useContext( EditorConfigContext ); 18 | 19 | const title = __( 'Enable smooth cursor animation', 'custom-html-block-extension' ); 20 | const isMatch = searchQuery && title.toLowerCase().includes( searchQuery.toLowerCase() ); 21 | 22 | if ( searchQuery && ! isMatch ) { 23 | return null; 24 | } 25 | 26 | const onChange = ( value ) => { 27 | setEditorOptions( { 28 | ...editorOptions, 29 | cursorSmoothCaretAnimation: value, 30 | } ); 31 | }; 32 | 33 | return ( 34 | 35 | 41 | 59 | 60 | ); 61 | } 62 | -------------------------------------------------------------------------------- /src/admin/editor-config/editor-options/hide-cursor-in-overview-ruler.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { useContext } from '@wordpress/element'; 6 | import { ToggleControl, __experimentalHStack as HStack } from '@wordpress/components'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import { AdminContext } from '../../index'; 12 | import { EditorConfigContext } from '../index'; 13 | import ItemHelp from '../components/item-help'; 14 | 15 | export default function HideCursorInOverviewRuler() { 16 | const { editorOptions, setEditorOptions } = useContext( AdminContext ); 17 | const { searchQuery } = useContext( EditorConfigContext ); 18 | 19 | const title = __( 'Hide cursor position on scroll bar', 'custom-html-block-extension' ); 20 | const isMatch = searchQuery && title.toLowerCase().includes( searchQuery.toLowerCase() ); 21 | 22 | if ( searchQuery && ! isMatch ) { 23 | return null; 24 | } 25 | 26 | const onChange = ( value ) => { 27 | setEditorOptions( { 28 | ...editorOptions, 29 | hideCursorInOverviewRuler: value, 30 | } ); 31 | }; 32 | 33 | return ( 34 | 35 | 41 | 59 | 60 | ); 61 | } 62 | -------------------------------------------------------------------------------- /src/admin/editor-config/editor-options/highlight-active-indent-guide.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { useContext } from '@wordpress/element'; 6 | import { ToggleControl, __experimentalHStack as HStack } from '@wordpress/components'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import { AdminContext } from '../../index'; 12 | import { EditorConfigContext } from '../index'; 13 | import ItemHelp from '../components/item-help'; 14 | 15 | export default function HighlightActiveIndentGuide() { 16 | const { editorOptions, setEditorOptions } = useContext( AdminContext ); 17 | const { searchQuery } = useContext( EditorConfigContext ); 18 | 19 | const title = __( 'Highlight the active indent guide', 'custom-html-block-extension' ); 20 | const isMatch = searchQuery && title.toLowerCase().includes( searchQuery.toLowerCase() ); 21 | 22 | if ( searchQuery && ! isMatch ) { 23 | return null; 24 | } 25 | 26 | const onChange = ( value ) => { 27 | setEditorOptions( { 28 | ...editorOptions, 29 | highlightActiveIndentGuide: value, 30 | } ); 31 | }; 32 | 33 | return ( 34 | 35 | 41 | 59 | 60 | ); 61 | } 62 | -------------------------------------------------------------------------------- /src/admin/editor-config/editor-options/select-on-line-numbers.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { useContext } from '@wordpress/element'; 6 | import { ToggleControl, __experimentalHStack as HStack } from '@wordpress/components'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import { AdminContext } from '../../index'; 12 | import { EditorConfigContext } from '../index'; 13 | import ItemHelp from '../components/item-help'; 14 | 15 | export default function SelectOnLineNumbers() { 16 | const { editorOptions, setEditorOptions } = useContext( AdminContext ); 17 | const { searchQuery } = useContext( EditorConfigContext ); 18 | 19 | const title = __( 20 | 'Select the corresponding line when clicking on the line number', 21 | 'custom-html-block-extension' 22 | ); 23 | const isMatch = searchQuery && title.toLowerCase().includes( searchQuery.toLowerCase() ); 24 | 25 | if ( searchQuery && ! isMatch ) { 26 | return null; 27 | } 28 | 29 | const onChange = ( value ) => { 30 | setEditorOptions( { 31 | ...editorOptions, 32 | selectOnLineNumbers: value, 33 | } ); 34 | }; 35 | 36 | return ( 37 | 38 | 44 | 62 | 63 | ); 64 | } 65 | -------------------------------------------------------------------------------- /src/admin/editor-config/editor-options/glyph-margin.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { useContext } from '@wordpress/element'; 6 | import { ToggleControl, __experimentalHStack as HStack } from '@wordpress/components'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import { AdminContext } from '../../index'; 12 | import { EditorConfigContext } from '../index'; 13 | import ItemHelp from '../components/item-help'; 14 | 15 | export default function GlyphMargin() { 16 | const { editorOptions, setEditorOptions } = useContext( AdminContext ); 17 | const { searchQuery } = useContext( EditorConfigContext ); 18 | 19 | const title = __( 'Show left margin', 'custom-html-block-extension' ); 20 | const isMatch = searchQuery && title.toLowerCase().includes( searchQuery.toLowerCase() ); 21 | 22 | if ( searchQuery && ! isMatch ) { 23 | return null; 24 | } 25 | 26 | const onChange = ( value ) => { 27 | setEditorOptions( { 28 | ...editorOptions, 29 | glyphMargin: value, 30 | } ); 31 | }; 32 | 33 | return ( 34 | 35 | 41 | 63 | 64 | ); 65 | } 66 | -------------------------------------------------------------------------------- /src/admin/editor-config/editor-options/scrollbar/use-shadows.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { useContext } from '@wordpress/element'; 6 | import { ToggleControl, __experimentalHStack as HStack } from '@wordpress/components'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import { AdminContext } from '../../../index'; 12 | import { EditorConfigContext } from '../../index'; 13 | import ItemHelp from '../../components/item-help'; 14 | 15 | export default function ScrollbarUseShadows() { 16 | const { editorOptions, setEditorOptions } = useContext( AdminContext ); 17 | const { searchQuery } = useContext( EditorConfigContext ); 18 | 19 | const title = __( 'Show subtle shadows to the left & top', 'custom-html-block-extension' ); 20 | const isMatch = searchQuery && title.toLowerCase().includes( searchQuery.toLowerCase() ); 21 | 22 | if ( searchQuery && ! isMatch ) { 23 | return null; 24 | } 25 | 26 | const onChange = ( value ) => { 27 | setEditorOptions( { 28 | ...editorOptions, 29 | scrollbar: { 30 | ...editorOptions.scrollbar, 31 | useShadows: value, 32 | }, 33 | } ); 34 | }; 35 | 36 | return ( 37 | 38 | 44 | 62 | 63 | ); 64 | } 65 | -------------------------------------------------------------------------------- /src/admin/editor-config/editor-settings/insert-spaces.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { useContext } from '@wordpress/element'; 6 | import { 7 | __experimentalHStack as HStack, 8 | __experimentalToggleGroupControl as ToggleGroupControl, 9 | __experimentalToggleGroupControlOption as ToggleGroupControlOption, 10 | } from '@wordpress/components'; 11 | 12 | /** 13 | * Internal dependencies 14 | */ 15 | import { AdminContext } from '../../index'; 16 | import { EditorConfigContext } from '../index'; 17 | 18 | export default function InsertSpaces() { 19 | const { editorSettings, setEditorSettings } = useContext( AdminContext ); 20 | const { searchQuery } = useContext( EditorConfigContext ); 21 | 22 | const title = __( 'Indent type', 'custom-html-block-extension' ); 23 | const isMatch = searchQuery && title.toLowerCase().includes( searchQuery.toLowerCase() ); 24 | 25 | if ( searchQuery && ! isMatch ) { 26 | return null; 27 | } 28 | 29 | const items = [ 30 | { 31 | label: __( 'Tab', 'custom-html-block-extension' ), 32 | image: 'editor-options/multi-cursor-paste_1.gif', 33 | value: false, 34 | }, 35 | { 36 | label: __( 'Space', 'custom-html-block-extension' ), 37 | image: 'editor-options/multi-cursor-paste_2.gif', 38 | value: true, 39 | }, 40 | ]; 41 | 42 | const onChange = ( value ) => { 43 | setEditorSettings( { 44 | ...editorSettings, 45 | insertSpaces: value, 46 | } ); 47 | }; 48 | 49 | return ( 50 | 51 | 59 | { items.map( ( item ) => ( 60 | 61 | ) ) } 62 | 63 | 64 | ); 65 | } 66 | -------------------------------------------------------------------------------- /src/admin/editor-config/editor-options/find/addextra-space-on-top.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { useContext } from '@wordpress/element'; 6 | import { ToggleControl, __experimentalHStack as HStack } from '@wordpress/components'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import { AdminContext } from '../../../index'; 12 | import { EditorConfigContext } from '../../index'; 13 | import ItemHelp from '../../components/item-help'; 14 | 15 | export default function FindAddExtraSpaceOnTop() { 16 | const { editorOptions, setEditorOptions } = useContext( AdminContext ); 17 | const { searchQuery } = useContext( EditorConfigContext ); 18 | 19 | const title = __( 'Show search widget above the first line', 'custom-html-block-extension' ); 20 | const isMatch = searchQuery && title.toLowerCase().includes( searchQuery.toLowerCase() ); 21 | 22 | if ( searchQuery && ! isMatch ) { 23 | return null; 24 | } 25 | 26 | const onChange = ( value ) => { 27 | setEditorOptions( { 28 | ...editorOptions, 29 | find: { 30 | ...editorOptions.find, 31 | addExtraSpaceOnTop: value, 32 | }, 33 | } ); 34 | }; 35 | 36 | return ( 37 | 38 | 44 | 62 | 63 | ); 64 | } 65 | -------------------------------------------------------------------------------- /src/lib/themes/slush-and-poppies.json: -------------------------------------------------------------------------------- 1 | { 2 | "base": "vs", 3 | "inherit": true, 4 | "rules": [ 5 | { 6 | "foreground": "406040", 7 | "token": "comment" 8 | }, 9 | { 10 | "foreground": "c03030", 11 | "token": "string" 12 | }, 13 | { 14 | "foreground": "0080a0", 15 | "token": "constant.numeric" 16 | }, 17 | { 18 | "fontStyle": "underline", 19 | "token": "source.ocaml constant.numeric.floating-point" 20 | }, 21 | { 22 | "foreground": "800000", 23 | "token": "constant.character" 24 | }, 25 | { 26 | "foreground": "2060a0", 27 | "token": "keyword" 28 | }, 29 | { 30 | "foreground": "2060a0", 31 | "token": "keyword.operator" 32 | }, 33 | { 34 | "fontStyle": "underline", 35 | "token": "source.ocaml keyword.operator.symbol.prefix.floating-point" 36 | }, 37 | { 38 | "fontStyle": "underline", 39 | "token": "source.ocaml keyword.operator.symbol.infix.floating-point" 40 | }, 41 | { 42 | "foreground": "0080ff", 43 | "token": "entity.name.module" 44 | }, 45 | { 46 | "foreground": "0080ff", 47 | "token": "support.other.module" 48 | }, 49 | { 50 | "foreground": "a08000", 51 | "token": "storage.type" 52 | }, 53 | { 54 | "foreground": "008080", 55 | "token": "storage" 56 | }, 57 | { 58 | "foreground": "c08060", 59 | "token": "entity.name.class.variant" 60 | }, 61 | { 62 | "fontStyle": "bold", 63 | "token": "keyword.other.directive" 64 | }, 65 | { 66 | "foreground": "800000", 67 | "token": "entity.name.function" 68 | }, 69 | { 70 | "foreground": "800080", 71 | "token": "storage.type.user-defined" 72 | }, 73 | { 74 | "foreground": "8000c0", 75 | "token": "entity.name.type.class.type" 76 | } 77 | ], 78 | "colors": { 79 | "editor.foreground": "#000000", 80 | "editor.background": "#F1F1F1", 81 | "editor.selectionBackground": "#B0B0FF", 82 | "editor.lineHighlightBackground": "#00000026", 83 | "editorCursor.foreground": "#000000", 84 | "editorWhitespace.foreground": "#BFBFBF" 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /src/admin/editor-config/editor-options/render-line-highlight-only-when-focus.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { useContext } from '@wordpress/element'; 6 | import { ToggleControl, __experimentalHStack as HStack } from '@wordpress/components'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import { AdminContext } from '../../index'; 12 | import { EditorConfigContext } from '../index'; 13 | import ItemHelp from '../components/item-help'; 14 | 15 | export default function RenderLineHighlightOnlyWhenFocus() { 16 | const { editorOptions, setEditorOptions } = useContext( AdminContext ); 17 | const { searchQuery } = useContext( EditorConfigContext ); 18 | 19 | const title = __( 20 | 'Highlight current line only the editor is focused', 21 | 'custom-html-block-extension' 22 | ); 23 | const isMatch = searchQuery && title.toLowerCase().includes( searchQuery.toLowerCase() ); 24 | 25 | if ( searchQuery && ! isMatch ) { 26 | return null; 27 | } 28 | 29 | const onChange = ( value ) => { 30 | setEditorOptions( { 31 | ...editorOptions, 32 | renderLineHighlightOnlyWhenFocus: value, 33 | } ); 34 | }; 35 | 36 | return ( 37 | 38 | 44 | 62 | 63 | ); 64 | } 65 | -------------------------------------------------------------------------------- /src/admin/editor-config/editor-options/show-folding-controls.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { useContext } from '@wordpress/element'; 6 | import { SelectControl, __experimentalHStack as HStack } from '@wordpress/components'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import { AdminContext } from '../../index'; 12 | import { EditorConfigContext } from '../index'; 13 | import ItemHelp from '../components/item-help'; 14 | 15 | export default function ShowFoldingControls() { 16 | const { editorOptions, setEditorOptions } = useContext( AdminContext ); 17 | const { searchQuery } = useContext( EditorConfigContext ); 18 | 19 | const title = __( 'Show code folding icon', 'custom-html-block-extension' ); 20 | const isMatch = searchQuery && title.toLowerCase().includes( searchQuery.toLowerCase() ); 21 | 22 | if ( searchQuery && ! isMatch ) { 23 | return null; 24 | } 25 | 26 | const items = [ 27 | { 28 | label: __( 'Always show', 'custom-html-block-extension' ), 29 | image: 'editor-options/show-folding-controls_1.jpg', 30 | value: 'always', 31 | }, 32 | { 33 | label: __( 'Show on mouseover', 'custom-html-block-extension' ), 34 | image: 'editor-options/show-folding-controls_2.gif', 35 | value: 'mouseover', 36 | isDefault: true, 37 | }, 38 | ]; 39 | 40 | const onChange = ( value ) => { 41 | setEditorOptions( { 42 | ...editorOptions, 43 | showFoldingControls: value, 44 | } ); 45 | }; 46 | 47 | return ( 48 | 49 | { 55 | return { label, value }; 56 | } ) } 57 | onChange={ onChange } 58 | /> 59 | 65 | 66 | ); 67 | } 68 | -------------------------------------------------------------------------------- /src/lib/themes/all-hallows-eve.json: -------------------------------------------------------------------------------- 1 | { 2 | "base": "vs-dark", 3 | "inherit": true, 4 | "rules": [ 5 | { 6 | "foreground": "ffffff", 7 | "background": "434242", 8 | "token": "text" 9 | }, 10 | { 11 | "foreground": "ffffff", 12 | "background": "000000", 13 | "token": "source" 14 | }, 15 | { 16 | "foreground": "9933cc", 17 | "token": "comment" 18 | }, 19 | { 20 | "foreground": "3387cc", 21 | "token": "constant" 22 | }, 23 | { 24 | "foreground": "cc7833", 25 | "token": "keyword" 26 | }, 27 | { 28 | "foreground": "d0d0ff", 29 | "token": "meta.preprocessor.c" 30 | }, 31 | { 32 | "fontStyle": "italic", 33 | "token": "variable.parameter" 34 | }, 35 | { 36 | "foreground": "ffffff", 37 | "background": "9b9b9b", 38 | "token": "source comment.block" 39 | }, 40 | { 41 | "foreground": "66cc33", 42 | "token": "string" 43 | }, 44 | { 45 | "foreground": "aaaaaa", 46 | "token": "string constant.character.escape" 47 | }, 48 | { 49 | "foreground": "000000", 50 | "background": "cccc33", 51 | "token": "string.interpolated" 52 | }, 53 | { 54 | "foreground": "cccc33", 55 | "token": "string.regexp" 56 | }, 57 | { 58 | "foreground": "cccc33", 59 | "token": "string.literal" 60 | }, 61 | { 62 | "foreground": "555555", 63 | "token": "string.interpolated constant.character.escape" 64 | }, 65 | { 66 | "fontStyle": "underline", 67 | "token": "entity.name.type" 68 | }, 69 | { 70 | "fontStyle": "italic underline", 71 | "token": "entity.other.inherited-class" 72 | }, 73 | { 74 | "fontStyle": "underline", 75 | "token": "entity.name.tag" 76 | }, 77 | { 78 | "foreground": "c83730", 79 | "token": "support.function" 80 | } 81 | ], 82 | "colors": { 83 | "editor.foreground": "#FFFFFF", 84 | "editor.background": "#000000", 85 | "editor.selectionBackground": "#73597EE0", 86 | "editor.lineHighlightBackground": "#333300", 87 | "editorCursor.foreground": "#FFFFFF", 88 | "editorWhitespace.foreground": "#404040" 89 | } 90 | } 91 | --------------------------------------------------------------------------------