Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #193565

    Q1. Where is the code for Enfold’s straight text editor on the backend?

    There are two options for editing straight Text Blocks with ALB
    1. Visual
    2. Straight Text

    Unfortunately straight text doesn’t echo straight text. The ALB GUI inserts < p > tags automatically at the beginning of the element which affects the underlying CSS due to padding you’ve assigned to P tags.

    I really don’t want a hack or workaround using CSS. That’s a band-aid approach. I want to remove the P tags from the PHP that’s automatically inserting into the DIV. It is playing havoc with many things with UL’s and LI’s and other positioned elements.

    Straight text should actually yield straight text. You already have a full-featured editor onboard.
    You’re probably going to suggest using the default text editor below the ALB. (yes I’ve enabled this in the functions file)
    But that’s not an option with Masonry because you have a bug when publishing where all of the code disappears and you loose ALL of your work if you shift back and forth between ALB and the short code editor. You had this bug with other tools and I think Kriesi addressed it and made the two pages that publish things on the back end sing together. But it has not been cleared up with the new Masonry tool you released about a month ago. Go try it. You’ll see. I had been dealing with the bug by keeping backup text files, but this is not really an option now due to the inability to insert text without it being overwritten by ALB.

    I really don’t want to wait for an update to fix Masonry. It affects every text element I edit in Masonry and I’m doing a lot of straight text editing on pages for scripts. (I haven’t tried other environments, it may impact them too) On that same note, when inserting Javascript inside a straight text block or the short code editor your PHP inserts CDATA tags which constantly need removal because it breaks the script. It only affects Javascript when you go back and try to edit existing Javascript that you initially placed in a text block. Knowing which file echos the PHP will probably also steer me where the CData wrapper is written. I really need to know where the automated paragraph tags are written, so I can proceed with site development or I’m dead in the water with what I want to accomplish.



    Hi websitegurus!

    You can add this code in the functions.php

    remove_filter( 'the_content', 'wpautop' );
    remove_filter( 'the_excerpt', 'wpautop' );

    You can also edit the config-templatebuilder > avia-shortcodes > textblock.php, find this code on line 61:

    $params['innerHtml'] = "<div class='avia_textblock avia_textblock_style' data-update_with='content'>".stripslashes(wpautop(trim(html_entity_decode( $params['content']) )))."</div>";

    .. then replace it with:

    $params['innerHtml'] = "<div class='avia_textblock avia_textblock_style' data-update_with='content'>".stripslashes(trim(html_entity_decode( $params['content']) ))."</div>";

    This should disable the default wpautop function in the text block.

    // http://codex.wordpress.org/Function_Reference/wpautop



    Thanks for your input. Long weekend off here in the states, so can you leave this thread open for now until I get a chance to test it out. I won’t be able to take a gander at it until early next week. Thx.


    Following this and tried it myself but it did not work. There are still ‘<p>’ tags showing up in text blocks.



    can yu show us the page you are using with the code Ismael suggested activated, so we can review it?
    Have you cleared your cache also and turned of all the plugins after added the code, so you are sure there was no issue at all or a conflict?

    Thanks a lot


Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘2 THINGS: How do I remove automated P tags in straight text & a bug in Enfold’ is closed to new replies.