[SOLVED] TinyMCE - 3rd party div plugin - add plugin from scratch

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
Z4uit
New Member
New Member
Posts: 9
Joined: Sun May 16, 2010 1:19 pm

[SOLVED] TinyMCE - 3rd party div plugin - add plugin from scratch

Post by Z4uit »

Hey All,

Before you read this, I am a totally noob on TinyMCE and I am not that good in javascript.
I want to do something very simple, add a new plugin to TinyMCE in the CMSms environment.
I have read several things about it, and that should not be the problem, if my plugin already was
a real plugin.

I have found this article and I want to include that specific plugin in my CMSms version:
http://tinymce.moxiecode.com/punbb/viewtopic.php?pid=73468
Unless one of you knows a better, finished plugin for this function of course.

My main questions are, where to put this code and how to add this properly to the plugin list?
This seems to be a good way of adding plugins, however the topicstarter did not succeed:
http://forum.cmsmadesimple.org/index.php/topic,15359.msg78885.html#msg78885

But the media plugin was allready finished and put in the right files and folders. Can I simply add
the code of the first link to a javascript file, or do I have to do more?

Thanks in advance,

Z4uit
Last edited by Z4uit on Wed May 26, 2010 11:46 am, edited 1 time in total.
Z4uit
New Member
New Member
Posts: 9
Joined: Sun May 16, 2010 1:19 pm

Re: TinyMCE - add plugin from scratch

Post by Z4uit »

Hey All,

Bumping is nog allowed I think, but since I have searched this forum for old posts for givingme the answer and since
I have read the readme for creating Plugins from modules for TinyMCE, but still don't have the answer, I tought
maybe it is tolerated...

Z4uit
Z4uit
New Member
New Member
Posts: 9
Joined: Sun May 16, 2010 1:19 pm

Re: [SOLVED] TinyMCE - add plugin from scratch

Post by Z4uit »

If it is alright with the writer of the plugin, I will attach it to this post.
[edit]The writer agreed so here they are, change the .txt to .js[edit]
Then you just have to add the files to:

Code: Select all

modules\TinyMCE\tinymce\jscripts\tiny_mce\plugins\div
And in the Extensions -> TinyMCE menu you choose Plugins, check the div checkbox
and add the button (named wrapdiv) to your toolbars set under Profiles.

The reason I could not make it work was that I thought that the name of
the button was div, the same name as the plugin itselves, but it was not.

Z4uit

P.s. If you have TinyMCE 3.3 (or higher later on) then the smaller and quicker
editor is good enough, again change the .js into .txt and remove _v3.3 from the file name.
Then repeat the steps described above for the normal script.

But somewhere this:

Code: Select all

formats:{
    divwrap:{block : 'div', wrapper : 1}
  }
has to be added. Of course it has to be in the TinyMCE.init() but that can not be
edited in CMS MS I think.
Attachments

[The extension txt has been deactivated and can no longer be displayed.]

[The extension txt has been deactivated and can no longer be displayed.]

divwrap.gif
divwrap.gif (159 Bytes) Viewed 2724 times
Last edited by Z4uit on Wed May 26, 2010 11:38 am, edited 1 time in total.
Post Reply

Return to “Modules/Add-Ons”