Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I've written a custom plugin for my fishkeeping website which allows users to enter information about a species of tropical fish (i.e. "habitat", "distribution", "locality", etc).

Each of these are meta fields. They're currently drag/drop collapsible meta fields, using cleditor as the rich text editor of choice.

I opted for cleditor because back in WP 2.8 or whatever it was that I started the development of this plugin on, I couldn't work out a way of getting multiple instances of TinyMCE on to the same page.

By "multiple instances", I primarily mean editors with different heights and buttons.

Since then, I believe wp_editor command has come in to play, which might assist me somewhat.

My question is this: is it possible to have multiple, different instances of TinyMCE on the same page in the admin area of WP?

Here's my written version of a use case diagram!

  • User clicks into "Species" menu, clicks "Add new species"
  • User sees a number of meta boxes. I'm not too fussed if these are drag/droppable, but it'd be useful if they could be collapsed and if they could be removed from the screen entirely.
  • Certain fields like "genus" and "species" are less than 25 characters each. Can TinyMCE be reduced to a single row? Not a huge problem if it can't.
  • Certain fields will need a row of custom buttons - I know I can create these in TinyMCE, but can I have my genus field with 3 buttons on, my habitat field with the normal set of buttons on and my water_chemistry field with a row of 8 custom buttons?
  • Certain fields will need to be different sizes - genus as I mentioned earlier will need to be as small as possible in both dimensions; max_size_notes will need to be 8 rows and misc_notes will need to be 16.
  • I'd prefer to use wp_editor() if at all possible as it's clean and easy..!

A detailed, insightful answer would be hugely appreciated here. I've spent a great deal of time getting cleditor working and writing buttons for it, only to find that it has a number of formatting bugs :(

Thanks in advance,

share|improve this question
    
I think you mean wp_editor? –  soulseekah Mar 29 '12 at 19:21
    
2  
the_editor is Deprecated: 3.3 in favor of wp_editor(), try to use it instead, should be more stable, although it does have its own caveats. –  soulseekah Mar 29 '12 at 20:34
    
Ahh, I see. Thanks! –  dunc Mar 29 '12 at 21:14

1 Answer 1

up vote 0 down vote accepted

you've got a lot of options. some of which are:

to toot my own horn, i have used WP Alchemy to create repeating sortable tinyMCE editors with all the code available here

http://www.kathyisawesome.com/426/multiple-wordpress-wysiwyg-visual-editors/

there is also the http://www.advancedcustomfields.com/ plugin. you can definitely have multiple instances, but you can't add dynamic blocks on the fly.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.