Skip to content

Commit

Permalink
Wrap tags in format
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Jun 23, 2024
1 parent 83a37f3 commit f314461
Show file tree
Hide file tree
Showing 9 changed files with 399 additions and 12 deletions.
251 changes: 251 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"main": "index.js",
"type": "module",
"scripts": {
"postinstall": "patch-package",
"start": "vite",
"build": "vite build",
"sync": "npm run build && cap sync",
Expand Down Expand Up @@ -46,6 +47,7 @@
"@wordpress/prettier-config": "^4.0.0",
"fsa-mock": "^1.0.0",
"husky": "^8.0.3",
"patch-package": "^8.0.0",
"prettier": "^3.3.1",
"sharp-cli": "^4.2.0",
"vite": "^5.2.12"
Expand Down
13 changes: 13 additions & 0 deletions patches/@wordpress+block-editor+13.0.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/node_modules/@wordpress/block-editor/build-module/components/rich-text/event-listeners/input-rules.js b/node_modules/@wordpress/block-editor/build-module/components/rich-text/event-listeners/input-rules.js
index 03436e6..225ec15 100644
--- a/node_modules/@wordpress/block-editor/build-module/components/rich-text/event-listeners/input-rules.js
+++ b/node_modules/@wordpress/block-editor/build-module/components/rich-text/event-listeners/input-rules.js
@@ -112,7 +112,7 @@ export default (props => element => {
__unstableMarkLastChangeAsPersistent();
onChange({
...transformed,
- activeFormats: value.activeFormats
+ // activeFormats: value.activeFormats
});
__unstableMarkAutomaticChange();
}
2 changes: 1 addition & 1 deletion src/content.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ body {
font-family: Hoefler Text;
font-size: 20px;
padding: 1px 1em;
}
}
4 changes: 4 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@ import { Preferences } from '@capacitor/preferences';
import { get } from 'idb-keyval';
import { createRoot } from 'react-dom/client';
import { registerCoreBlocks } from '@wordpress/block-library';
import { registerFormatType } from '@wordpress/rich-text';
import tagFormat from './tag-format';

import app from './app';

import '@wordpress/format-library';

registerFormatType(tagFormat.name, tagFormat);

// It is needed for the appenders, this should be fixed in GB.
import '@wordpress/block-editor/build-style/content.css';

Expand Down
Loading

0 comments on commit f314461

Please sign in to comment.