XF 2.0 Adding editor icon under "Insert"

Jake B.

Well-known member
I have an editor icon that I want to add under "Inset" so it's a sibling of "media", "quote", etc. I can't currently see a way to do this as in editor.js where it's defined it's a variable within a function. Just curious if there is a way to do this that I haven't seen
 
See the "editor:buttons" event that's triggered. It should allow you to modify the "insertButtons" data within that.
 
You can look through the JS files of my Editor Manager. I've done kind of what you want in a few places.

I personally favor hooking into the editor:config event, that'll give you access to the whole configuration file. After initializing your Icon and Button, you can add it to xfInsert there.
 
Hello @Mike

See the "editor:buttons" event that's triggered. It should allow you to modify the "insertButtons" data within that.
Is there any documentation or sample code available for listening js events? Also where can i find the list of js events available?
 
Back
Top Bottom