MyBB Community Forums

Full Version: Make editor button to directly output a string.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is their a way to directly output a string when clicking within the editor.

So lets say you create a new button is their a way then to make it put a string like; 'test' directly into the textarea field?
Without treating it like a MyCode how it currently works.
Sure. You just have to write your own function that handles it (like insertURL(), insertIMG()) in the editor.js. This function would then this.performInsert('test') or similar.
(2012-10-19, 08:44 PM)frostschutz Wrote: [ -> ]Sure. You just have to write your own function that handles it (like insertURL(), insertIMG()) in the editor.js. This function would then this.performInsert('test') or similar.

Ah thank you, will try if i can make it work Smile
Will leave it unsolved for a moment to check if i can get done what i want Smile