Notion-like editing and layout with a convenient freeform collaborative editor in WordPress? [closed]
Notion-like editing and layout with a convenient freeform collaborative editor in WordPress? [closed]
Notion-like editing and layout with a convenient freeform collaborative editor in WordPress? [closed]
After a few more days of frustrating testing, I managed to track the issue down to the External Links Rewrite option in Siteground’s Site Tools, under SSL options. When HTTP Enforce is enabled with the optional External Links Rewrite option (being able to see these changes virtually immediately in the browser requires a Force Refresh, … Read more
Looks like WP_Screen::is_block_editor() is what you want. Here’s some rough code to demonstrate: add_filter( ‘default_content’, function( $content, $post ) { $screen = function_exists( ‘get_current_screen’ ) ? get_current_screen() : null; $is_block_editor = $screen ? $screen->is_block_editor() : false; if ( $is_block_editor ) { // Do your block editor stuff here } else { // Do your classic … Read more
The effect you are looking for can be achieved by adding the box-shadow to the link element directly. The span is totally unnecessary: Just change this: a { color: #545454; text-decoration: none; } a span:hover { color: #000000; box-shadow: inset 0 -10px #ffbe76; } a span{ box-shadow: inset 0 -10px #f6e58d; } To this: a … Read more
I found the following snippet which we can add to functions.php . I’m adding these via a plugin. function clear_br($content) { return str_replace(“<br>”,”<br clear=”none”>”, $content); } add_filter(‘the_content’,’clear_br’); Note that I’ve put “<br>” tag which is what wordpress creates when you enter newline characters.
The parent theme’s functions.php has two functions to manage the editor styles. They are twentytwenty_classic_editor_styles() and twentytwenty_block_editor_styles() and they’re both hooked to init. For example, the classic editor function reads: function twentytwenty_classic_editor_styles() { $classic_editor_styles = array( ‘/assets/css/editor-style-classic.css’, ); add_editor_style( $classic_editor_styles ); } add_action( ‘init’, ‘twentytwenty_classic_editor_styles’ ); To override those styles, copy both of those functions … Read more
Yes, this is possible. You could do it when saving the post, or just when rendering (which won’t change the actual content in the editor). Using the_content filter, replacing characters in rendering: function wpse_387560( $content ) { $content = str_replace( ‘ ’, ‘ ‘, $content ); return $content; } add_filter( ‘the_content’, ‘wpse_387560’ ); Using the wp_insert_post_data … Read more
So I must be missing some essential piece that preserves html. No, your code is OK. However, I would require the second parameter ($editor_id) and check whether its value is attachment_content which is the editor ID for the media description textarea on the “Edit Media” page. I also wouldn’t add the ‘textarea_name’ => ‘content’ part. … Read more
Hit Shift + Enter and you”ll get <br>
Facilitating users to write content in an external editor, and then copy/paste it into the WordPress editor, is a fundamentally bad approach, and is fraught with issues. The WordPress editor is intended to be used to write content. You should train your users to use the post editor to write content, as opposed to using … Read more