apply wordpress plugin logic to rich text editor