Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View technote-space's full-sized avatar
:octocat:
Hello, World!

Technote technote-space

:octocat:
Hello, World!
View GitHub Profile
@technote-space
technote-space / hello_world.html
Created September 24, 2021 13:44
Hello World!
Hello World!
@technote-space
technote-space / editor.css
Last active January 19, 2019 14:08
子テーマへの追加例2
.editor-styles-wrapper .test-class {
display: inline;
background-position: left -100% center;
background-repeat: repeat-x;
background-image: linear-gradient(to right, rgba(255, 255, 255, 0) 50%, #ff6 50%);
background-size: 200% .6em;
font-weight: bold;
padding-bottom: .6em;
}
@technote-space
technote-space / editor.js
Last active January 20, 2019 03:58
子テーマへの追加例
(function (richText, element, editor) {
const name = 'my-theme/my-theme';
const title = 'test-title';
const className = 'test-class';
richText.registerFormatType(name, {
title: title,
tagName: 'span',
className: className,
edit: function ({isActive, value, onChange}) {
return element.createElement(editor.RichTextToolbarButton, {
@technote-space
technote-space / editor.js
Last active January 9, 2019 15:39
Gutenberg複数追加例
(function (richText, element, editor) {
richText.registerFormatType('my-plugin/my-plugin1', {
title: 'my-plugin',
tagName: 'span',
className: 'class1',
edit: function ({isActive, value, onChange}) {
return element.createElement(editor.RichTextToolbarButton, {
icon: 'admin-customizer',
title: 'title1',
onClick: function () {