0

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,

3

1 Answer 1

0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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