Closed strarsis closed 4 years ago
wp-Typography is a WordPress wrapper for the mundschenk-at/php-typography
library. Nothing is done in JavaScript, other then removing some hidden characters for improved browser compatibility when using copy & paste.
I am going to close this as wontfix
, @strarsis, because while there are several theoretical ways to make WYSIWYG blocks, none of them are viable: Reimplementing PHP-Typography in JavaScript is a fantasy and replacing it with an existing library like Typeset would introduce a mismatch between the JS and PHP side. A block using server-side rendering would be easy to do, but not provide the WYSIWYG behavior your after.
Additionally, one of wp-Typography precepts is to not change the original content in the database - that does not work with a WYSIWYG block.
Issue Overview
wp-typography doesn't seem to run in the Gutenberg editor although it could as it uses JavaScript.
Steps to Reproduce (for bugs)
Expected Behavior
Typographic rules like hyphenation are applied to text in Gutenberg editor as in the frontend.
Current Behavior
Typographic rules are not applied to Gutenberg editor text.
Possible Solution
Re-using the JavaScript in frontend and rewrite some PHP of wp-typography into JavaScript to apply these rules also in Gutenberg editor.
Related Issues and/or PRs
https://github.com/mundschenk-at/wp-typography/issues/249