Support

Account

Home Forums Search Search Results for 'Wysiwyg'

Search Results for 'Wysiwyg'

reply

  • Hi elliot,
    Technically, no, I didn’t have the WYSIWYG toolbar turned off. HOWEVER, I am using a separate plugin called “CKEditor” to replace the default wordpress toolbar.

    As soon as I turned the CKEditor off, success! Now the WYSIWYG toolbar displays properly.

    I’m assuming it’s just a matter of the two plugins conflicting with each other? B/c the ACF custom fields plugin is probably connected to the default toolbar specifically?

    Thanks for your help and quick response!

  • Would you be able to assist if we we’re to purchase the WYSIWYG and Gallery add-ons? Need to find a way one way or another to be able to get the custom fields on other page.

  • Hi @alaena

    The line:

    
    TypeError: tinyMCE.settings is undefined
    

    Shows that the tinyMce is not available. Have you turned off the WYSIWYG toolbar for your user?

  • I am having the same problem – I checked the console log and it does look like something is preventing the wysiwyg field from loading. It looks like this:

    TypeError: tinyMCE.settings is undefined
    body = $(editor.getBody() );

    TypeError: editor.getBody is not a function
    body = $(editor.getBody() );

    I’m not super advanced in javascript, so I was wondering if there is an easier way of fixing this issue? Or thoughts on what could be preventing the wysiwyg field from loading?

    Thanks, your help is much appreciated!

  • Thanks E, I really appreciate your help with this.

    • You have a CPT called ‘Promo Boxes’ – Yes
    • ‘Promo Boxes’ suports the ‘category’ taxonomy – Yes
    • Promo Boxes has some custom fields. What are they? Are they relevant to this issue? – I’m not sure if they’re relevant, but just in case: Content (Wysiwyg Editor), Image (image), Link (text), Alternative title (text), Latest News or Reports? (Radio button)
    • You are tyring to load the category ID. Where from. – I’m not exactly sure how to answer this question, but the user may choose a category for a Promo Box, I’d like this category to be loaded, if Latest News or Reports? == Yes
    • What URL are you looking at? – http://burma.23.co.uk/campaigns/crisis-in-arkan-state/ – specifically the first box in the right column (News). Happy to give you admin access if that helps
    • What template file is running – I’m using the Roots theme and it’s base.php template, alongside four other custom templates: section.php (in the root folder, necessary for Roots, primarily used to import the three subsequent templates); left-section.php (the left sidebar); content-section.php (the centre column), right-section.php (the right sidebar).

    Does that give you what you need?

  • Hi @wdoutjah

    Your screenshots show that you have a JS error on the page which is preventing the WYSIWYG field to load.

    Can you open your console log and check for JS errors?

    Thanks
    E

  • Hi @Svenni

    My previous comment was mean to say: Are you sure the <!--nextpage--> exists.

    I now understand that this is part of WP, so please ignore that question.

    I had a read about the custom query but this again is basing the ‘pages’ on what is in the_content, not what is in a custom field.

    Are you able to ask the developer of the pageNavi plugin, if it is possible to use his plugin with an ACF WYSIWYG field?

    Cheers
    E

  • Hi @Finvaron

    Just one more question, what version of ACF are you using?

  • I tried it with the following vimeo link: http://vimeo.com/35329199.
    But any other link for example from youtube etc. doesn’t work for me too.

    Many Thanks!

  • Hi @elliot,

    You’re probably right.. however I’m having difficulties debugging the field type. Nothing is being registered in the debug.log file. Probably since it’s being loaded with ajax and the ajax call works..

    The only error I get is this js-error: Uncaught TypeError: Object [object Object] has no method ‘sortable’

    But I’m pretty sure that’s due to the wysiwyg script not loading since the post object field disrupts the loading.

    Do you have any tricks to get the field to output errors? I’ve tried doing print_r with a die(); right after but there’s no output anywhere.

    EDIT:

    Okay so I tried disabling all other plugins with no luck, so I guess that’s not the issue.. I did manage to get this error at the place where the field should have appeared in page edit: Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 262144 bytes) in /var/www/qa.nord-lock.com/wwwroot/wp-includes/wp-db.php on line 1225
    which I suppose makes your guess for it to be a loop correct. Now I just have to figure out why the hell its looping..

  • Hi @Finvaron

    Thanks mate, can you please post the URL that you are using for the oembed?

    I’ll do some testing on my end

  • Hi Elliot,

    at the moment I don’t know if it’s a real bug or a bug in programming, so an example with WP-PageNavi installed and integrated in page template:

    sample text:

    site 1
    <!--nextpage-->
    site 2
    <!--nextpage-->
    site 3

    sample text after clicking html button:

    <p>site 1</p>
    <p><!--nextpage--></p>
    <p>site 2</p>
    <p><!--nextpage--></p>
    <p>site 2</p>

    correct result in frontend if you put it in wp standard content field:

    site 1
    
    Pages: 1 2 3

    result in frontend if you put it eg. in ACF WYSIWYG field:

    site 1
    
    site 2
    
    site 3

    I use normal code in template to output acf field like this:

    <?php the_field("pagenavi-site");?>

    Grettings,
    Svenni

  • To be clear, I’m referring to the WYSIWYG editor on this forum site. Anyway, thanks for helping with my date formatting problem : )

  • Unrelated but odd … when I try to use the “link” tool in the WYSIWYG editor it shuts the entire site window after clicking the link window button (tried it a few times). Not sure if anyone else has this problem but thought I’d mention it.

  • Sorry, my english isn’t very well, maybe thats the problem. I try it again:

    If i create a WYSIWYG-Field with ACF and call it in the template files with: <?php the_field('nameoffield') ?> oEmbed doesn’t work. It only shows the video url.

    But if i used the standard editor from WordPress and i paste a video url in it, the oEmbed works as expected and i can see the video on the frontend.

    Tanks in advance!

  • May I ask why you stated that it didn’t work then?

  • Hi @David Crabill

    Currently, ACF is not able to use the native wp_editor functionality due to limitations with the repeater field and that function.

    I’ll take a look and find a way to allow for custom styles to be added to the ACF WYSIWYG.

    Thanks
    Elliot

  • That was absolutely the issue. Thanks, and sorry for wasting your time!

  • Not sure what you mean. It’s just the WYSIWYG field in ACF. Are you regerring to the PHP statement the_field?

  • Thank you for the quick response! Sure thing. The full piece of code I’m using is to pull the header from my main site to my sub-sites. The particular bit in question is this piece:

           <?php switch_to_blog(1); ?>
    	<?php if (get_field('activate_alert', 'option')) { ?>
    		<div id="globalAlert">
    			<div class="content"><?php the_field('manage_alert', 'option'); ?></div>
    		</div>
    	<?php } ?>

    The field activate_alert is a true/false field. So when the user checks it off as true, I want to display the manage_alert field, which is a basic wysiwyg field.

    The entire portion of code is as follows (so you can see where I’m placing the alert field in relation to the entire header):

    <body <?php body_class(); ?>>
    
    <?php switch_to_blog(1); ?>
    	<?php if (get_field('activate_alert', 'option')) { ?>
    		<div id="globalAlert">
    			<div class="content"><?php the_field('manage_alert', 'option'); ?></div>
    		</div>
    	<?php } ?>
    
    <div id="page" class="hfeed site">
    	<?php do_action( 'before' ); ?>
    	<div id="headerWrap">
    		<header id="masthead" class="site-header" role="banner">
    			<div id="imagebanner"></div>
    			<div class="site-branding">
    				<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
    				<?php $text=get_bloginfo('name'); $text=explode(' ',$text); $text[0]='<span>'.$text[0].'</span>'; $text=implode(' ',$text); echo $text; ?>
    				</a></h1>
    			</div>
    			
    			<div id="searchform"><?php global $global_site_search; echo $global_site_search->global_site_search_search_form_output('',''); ?></div>
    	
    			<nav id="site-navigation" class="navigation-main" role="navigation">
    				<?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
    			</nav><!-- #site-navigation -->
    
    			<nav id="secondary-navigation" class="navigation-secondary" role="navigation">
    				<?php wp_nav_menu( array( 'theme_location' => 'quicklinks', 'menu_class' => 'quicklinks', 'items_wrap' => '<ul id="%1$s" class="%2$s"><li><a href="#">Quick Links</a><ul>%3$s</ul></li></ul>' ) ); ?>
    				<?php wp_nav_menu( array( 'theme_location' => 'webconnect', 'menu_class' => 'webconnect', 'items_wrap' => '<ul id="%1$s" class="%2$s"><li><a href="#">Web Connect</a><ul>%3$s</ul></li></ul>' ) ); ?>
    			</nav><!-- #site-navigation -->
    
    		</header><!-- #masthead -->
    	</div>
    	<?php restore_current_blog(); ?>
    
  • Thanks elliot for your answer.
    I created a WYSIWYG field and use in the template files this code <?php the_field('nameoffield') ?>

    With the standard editor oEmbed works.

    Thanks!

  • @elliot, I figured as much. I tried a number of things before coming here, so I supposed that the feature hadn’t been included yet. Maybe with some guidance I can help get this into a future version.

    I’m just using the standard add_editor_style() to add custom styles to the backend wysiwyg boxes. This custom style works on both the_content and on acf wysiwyg fields.

    The custom style doesn’t work on the wysiwyg fields on the frontend. Looking at the source, there is a JS object called “tinyMCEPreInit” in the footer, which contains an element called “content_css”, which holds the url of the custom stylesheet. “tinyMCEPreInit” on the frontend looks similar to what’s on the backend, except that it doesn’t have the “content_css” element.

    I looked in the plugin and it looks like ACF might have a homegrown version of the wysiwyg field? I couldn’t tell if you’ve switched to using wp_editor() yet.

    wp_editor() has an argument called “editor_css”, presumably for that “content_css” element. If acf’s system is homegrown, maybe it would be possible to add an “editor_css” argument to the $options array for acf_form(), which could hold the url of the editor stylesheet. Or better yet, it would be nice if it just used the same logic to know when I’m calling add_editor_style(), which gets called through the ‘init’ action, so it should be available on the frontend.

  • Hi @JKNetDesign

    What is the code you are using to render the WYSIWYG value onto the template?

  • Hi @Finvaron

    Your statement is a bit bold.

    oEmbed does work with the WYSIWYG field, however, it may be possible that you are not using the correct ACF function to allow the oEmbed functionality.

    Can you post the code you are using?

  • Hi Elliot,

    It didn’t work because I still needed that function for the content area, so I needed an additional function.

    I found a link on your old forum half an hour ago that solved all my issues
    http://old.support.advancedcustomfields.com/discussion/2613/how-to-disable-auto-p-tags-in-wysiwyg-editor

    I was getting p tags around images, and shortcodes – causing lots of errors.

Viewing 25 results - 1,226 through 1,250 (of 1,297 total)