Skip to main content
deleted 2 characters in body; edited title
Source Link
turbonerd
  • 1.2k
  • 4
  • 26
  • 50

Using multiple instances of the_editorwp_editor in Custom Post Type admin area

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 the_editorwp_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 the_editorwp_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,

Using multiple instances of the_editor in Custom Post Type admin area

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 the_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 the_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,

Using multiple instances of wp_editor in Custom Post Type admin area

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,

Source Link
turbonerd
  • 1.2k
  • 4
  • 26
  • 50

Using multiple instances of the_editor in Custom Post Type admin area

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 the_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 the_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,