Skip Navigation

[Resolved] Custom cell and WYSIWYG

This support ticket is created 6 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 18 replies, has 3 voices.

Last updated by Christian Cox 6 years, 6 months ago.

Assisted by: Christian Cox.

Author
Posts
#595628

Hello,
I would like to reopen this topic: https://toolset.com/forums/topic/wysiwyg-editor-in-custom-cell/

May I ask you, if someone found a solution of using wysiwyg editor in custom cell? I have same issue as JeremiB. Using wp_editor function causes disabled Visual tab. HTML tab works properly. Thanks in advance.

#595768

Hi, we never received any feedback from that other ticket's author, so I'm not sure if the solution we provided worked or not. Have you implemented the suggestion here?
https://toolset.com/forums/topic/wysiwyg-editor-in-custom-cell/#post-365054

#595839

I made same implementation like in example, but Visual editor is still disabled. I found maybe a reason of problem. When I click on Insert link (or on paragraph selector), on browser concole appears "Uncaught TypeError: Cannot read property 'rangeCount' of null". There is probably mistake in order of loading JS files in cbox. Can you recommend, how to enqueue scripts needed for TinyMCE?

#596004

Let me reach out to my 2nd tier support team for some additional insight here. I'll let them know the proposed solution does not work for you, and follow up with you when I get some feedback.

#596106

It seems, there is a relation between colorbox status (should be "oncompleted") and TinyMCE. Wp_editor should be called after complete load of colorbox. Is it reachable with layouts custom cells?

#596257

Hi, just a quick update to let you know I have passed your questions along and I am waiting to receive some feedback from our development team.

#597163

Hi Christian, I also need to use wysiwyg editor in custom cell - only HTML tab works properly.
Is there any solution?
Petr

#597450

Hello, is there any progress in this question? We shall to decide how to continue with toolset. This functionality is essential for us. Thanks in advance.

#597455

I'm afraid I don't have much more feedback to share at the moment. I have asked my 2nd tier support team for assistance and they have asked for more assistance from our development team, but we have yet to receive additional feedback.

#597725

Hi, I received some feedback from our developer overnight, and he has the following recommendations:
- Change the textarea ID and update the wp_editor function call to use the new ID
- Add the following scripts in PHP:

wp_enqueue_script('page');
wp_enqueue_script('editor');
add_thickbox();
wp_enqueue_script('media-upload');
wp_enqueue_script('word-count');
#597747

Thank you, but it doesn't work. Wysiwyg editor is still inactive, HTML editor works. There is still problem in combination of colorbox and wp_editor function. Can you give us a complete example of working custom cell with wp_editor. Thanks in advance.

#597787

Okay I'll relay your comments to the developer I am in contact with and update you when I have something to share.

#599955

Would it be possible for you to provide a Duplicator clone of your site? I would like to be able to show our developers what you have implemented so they can do some additional troubleshooting. I have enabled a private reply field here so you can share a link in confidence.

https://toolset.com/faq/provide-supporters-copy-site/

#600042
Screen Shot 2017-12-18 at 5.09.43 PM.png

- When is the section-intro6b.php file included? In my local test, I used this code in functions.php:

add_action( 'init', 'theme_register_section_intro_init', 99 );

function theme_register_section_intro_init() {
  if( class_exists( 'WPDD_Layouts' ) && !function_exists( 'include_ddl_layouts' ) )
  {
      function include_ddl_layouts( $tpls_dir = '' )
      {
          $dir_str = dirname(__FILE__) . $tpls_dir;
          $dir = opendir( $dir_str );
          while( ( $currentFile = readdir($dir) ) !== false ) {
             if ( $currentFile == '.' || $currentFile == '..' || $currentFile[0] == '.' ) {
                continue;
             }

             include $dir_str.$currentFile;
          }
          closedir($dir);
      }
      include_ddl_layouts( '/dd-layouts-cells/');
  }
}

Then in section-intro6b.php I changed the init priority to 199 so it fires after the other init callback:

add_action( 'init', 'register_section_intro_init', 199 );

The WYSIWYG editor seems to be working as expected for me. I am able to use the dropdown menu to select different styles, I'm able to use Bold and Italics...am I missing something? Here is a screenshot.

#600274

Hi,
problem is when I try to edit custom cell again and WYSIWYG is disabled.
Thanks.