block editor - Clipboard processing in Gutenburg

When WordPress was just using TinyMCE for its editor, it seems that there was a pretty straightforward manner of inserti

When WordPress was just using TinyMCE for its editor, it seems that there was a pretty straightforward manner of inserting custom code into the processing that would occur after the user requested to paste something into the editor.

It's a brave new world, and the Gutenburg editor is the new (and future) standard for WordPress content editing.

My question is: Is there currently (April 2019) a way for me to filter text that is pasted into the Gutenburg block editor as it is being pasted (as opposed to during the saving process, for example, with the content_save_pre hook)?

In an attempt to answer this question, I spent a lot of time sifting through the Gutenburg editor code yesterday, particularly the part that processes pasting.

It (unsurprisingly) is very involved, but from what I could find, it does not seem that there is any equivalent to the paste_preprocess hook that there was (and is) in TinyMCE.

I am not willing to edit my copy of core WordPress to get the behavior I want out of Gutenburg; obviously plugins are the alternative designed for customizing WordPress' behavior, so I would like to go that route; I'm just not sure there is actually a plugin route available here.

Do I need to go straight to the top with a feature request? Or am I missing something?

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745599063a4635290.html

相关推荐

  • block editor - Clipboard processing in Gutenburg

    When WordPress was just using TinyMCE for its editor, it seems that there was a pretty straightforward manner of inserti

    14小时前
    40

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信