How to add my custom element option in WordPress classic editor?

Is there any way to add my custom element in the Classic editor? Like if I click on the particular custom option it adds something to my post.

Or tell me the PHP file which regulates the Editor page in WordPress I will code myself.

@GulshanKumar @Saksham @Chey

1 Like

This plugin add something inside Classic editor. You can learn from it.

I don’t want to use plugins.

Read its code.

Ok sorry you said to take inspiration

It’s completely okay.

Let me check its code, I hope it helps. If it won’t I will use JS to insert button with append() or innerHTML button and then using EventListener I will append my content to the editor.

@GulshanKumar @piyush second method should definitely work right?

Thanks, @GulshanKumar for sharing it. Previously, I was thinking that making WP plugins is rocket science. But after checking the architecture, I got to know it’s very simple. I would love to build useful plugins on my own and contribute to the community.

BTW! I am modifying this Mango Buttons for my work so, I don’t need to do it from scratch. Hehe.

After checking the code of this plugin, I am thinking to declutter and optimize existing plugins to make them lightweight and distribute them on my website.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.