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
评论列表(0条)