Adding to the TinyMCE Editor

Jeremy

Well-known member
Hey Kier & Mike (mainly),

I remember you saying somewhere that the TinyMCE editor that you have coded here doesn't allow for custom images / text.... So, if I wanted to add custom BB Codes to them, would I have to extend the controller (I doubt that's possible for the editor) & manually edit the template? Or is there some magical way you guys have hidden from us to add items to the editor?

Thanks,
Jeremy
 

Jeremy

Well-known member
And... to answer this question. If I am correct (I haven't written any code) you can use the template hook for editor_js_init (I believe that is the name) and add a JS line in it for buttons to be added.
 

Jeremy

Well-known member
I have no idea how to add a button to TinyMce. I do not know any JS code is required. :)
If I am correct, you need to add something to editor_js_setup under xenforo: to set up hovers... And then add appropriate CSS. I'm not 100% sure, haven't gotten around to developing tha.t
 

James

Well-known member
TinyMCE is initialised in the editor_js_setup between the hook editor_tinymce_init.

You should be able to plug parameters straight into that from the TinyMCE Reference.

Let me know if you get anywhere.
 

Nek

Member
I've added button for custom BB code by copying and modifying code from "quote" button. There are three files must be modified for this task:
editor_template.js ( TinyMCE theme definition )
editor_js_setup
editor_ui.css
and adding new phrase to used languages
I have not any web programming experience, so it's maybe a creepy way, but at least, it works :D
 

mizter1nho

Well-known member
I've added button for custom BB code by copying and modifying code from "quote" button. There are three files must be modified for this task:
editor_template.js ( TinyMCE theme definition )
editor_js_setup
editor_ui.css
and adding new phrase to used languages
I have not any web programming experience, so it's maybe a creepy way, but at least, it works :D
Can you share code? Thank you.
 

Nek

Member
This pack contains three txt files which shows code changes. You can find them by arrows at left side.
BTW, editor_template.js changes were applied to a copy of original theme placed in another directory in "js\tinymce\themes\". And this files shows theme changing code too.
 

Attachments

Cool

Active member
this unfortunately is (at least for me) the big minus for xenforo. i personally need a fully working tinymce editor for admins.
 

James

Well-known member
I asked a while back if it'd be possible to edit the editor using TinyMCE code and I believe Mike replied saying it was possible. I cannot find the thread though, and I figured out it wasn't possible too.
 
R

ragtek

Guest
I've stopped trying to add them into the editor and i placed them under the editor^^
 
Top