Browse Source

rm sup/sub b/c added to core

windhamdavid 4 years ago
parent
commit
1aa7c483fc
2 changed files with 1 additions and 49 deletions
  1. 0 48
      dw-guten.js
  2. 1 1
      dw-guten.php

+ 0 - 48
dw-guten.js

@@ -1,53 +1,5 @@
 ( function( wp ) {
-	
-	var SupButton = function( props ) {
-		return wp.element.createElement(
-			wp.editor.RichTextToolbarButton, {
-				icon: 'arrow-up',
-				title: 'Sup',
-				onClick: function() {
-					props.onChange( wp.richText.toggleFormat(
-						props.value,
-						{ type: 'dw-guten/sup' }
-					) );
-				},
-				isActive: props.isActive,
-			}
-		);
-	}
 
-	var SubButton = function( props ) {
-		return wp.element.createElement(
-			wp.editor.RichTextToolbarButton, {
-				icon: 'arrow-down',
-				title: 'Sub',
-				onClick: function() {
-					props.onChange( wp.richText.toggleFormat(
-						props.value,
-						{ type: 'dw-guten/sub' }
-					) );
-				},
-				isActive: props.isActive,
-			}
-		);
-	}
 
-	wp.richText.registerFormatType(
-		'dw-guten/sup', {
-			title: 'Sup',
-			tagName: 'sup',
-			className: null,
-			edit: SupButton
-		}
-	);
-
-	wp.richText.registerFormatType(
-		'dw-guten/sub', {
-			title: 'Sub',
-			tagName: 'sub',
-			className: null,
-			edit: SubButton
-		}
-	);
 
 } )( window.wp );

+ 1 - 1
dw-guten.php

@@ -10,7 +10,7 @@ Author URI: https://davidawindham.com
 defined( 'ABSPATH' ) or die( 'yeah right' );
 
 
-/*********  add sup/sub to Gutenberg wp.editor.RichTextToolbarButton **********/
+/*********  add dw-guten.js to Gutenberg wp.editor.RichTextToolbarButton **********/
 
 function dw_guten_script_register() {
 	wp_register_script(