Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #842173

    Dear Support,
    I have noticed today that when using the Advance Layout Editor the syntax highlight stops working. I am using plugin ‘Crayon Syntax Highlighter’ which works fine when using with default WordPress editor. This plugin is very popular and it has 50000+ users.

    https://wordpress.org/plugins/crayon-syntax-highlighter/

    I tried to “generate” the code in WordPress default editor and then paste it to the “text block” as well as “code block” in Enfold. Unfortunately it did not work. The “raw” code from “view page source” is the following

    Using “text block”

    
    <pre class="lang:c++ decode:true " title="lalalala">lalalala</pre>
    

    Using “code block”

    
    <section class="avia_codeblock_section  avia_code_block_0"  itemscope="itemscope" itemtype="https://schema.org/BlogPosting" itemprop="blogPost" ><div class='avia_codeblock '  itemprop="text" > <pre class="lang:c++ decode:true " >lalalala</pre> </div></section>
    

    Below you can find what should be generated in the HTML

    
    <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
    
    		<div id="crayon-599b118ada197751915175" class="crayon-syntax crayon-theme-familiar crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
    		
    			<div class="crayon-toolbar" data-settings=" show" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;"><span class="crayon-title"></span>
    			<div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;"><div class="crayon-button crayon-nums-button" title="Toggle Line Numbers"><div class="crayon-button-icon"></div></div><div class="crayon-button crayon-plain-button" title="Toggle Plain Code"><div class="crayon-button-icon"></div></div><div class="crayon-button crayon-wrap-button" title="Toggle Line Wrap"><div class="crayon-button-icon"></div></div><div class="crayon-button crayon-expand-button" title="Expand Code"><div class="crayon-button-icon"></div></div><div class="crayon-button crayon-copy-button" title="Copy"><div class="crayon-button-icon"></div></div><div class="crayon-button crayon-popup-button" title="Open Code In New Window"><div class="crayon-button-icon"></div></div><span class="crayon-language">C++</span></div></div>
    			<div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;"></div>
    			<div class="crayon-plain-wrap"><textarea wrap="soft" class="crayon-plain print-no" data-settings="dblclick" readonly style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;">
    lalalala</textarea></div>
    			<div class="crayon-main" style="">
    				<table class="crayon-table">
    					<tr class="crayon-row">
    				<td class="crayon-nums " data-settings="show">
    					<div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;"><div class="crayon-num" data-line="crayon-599b118ada197751915175-1">1</div></div>
    				</td>
    						<td class="crayon-code"><div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><div class="crayon-line" id="crayon-599b118ada197751915175-1"><span class="crayon-v">lalalala</span></div></div></td>
    					</tr>
    				</table>
    			</div>
    		</div>
    <!-- [Format Time: 0.0002 seconds] -->
    

    Is there a way to “tell” the Advance Layout Editor not to interact with the “raw” code?

    Best regards,
    MD

    • This topic was modified 7 years, 3 months ago by midudek1.
    #842413

    Hey midudek1,

    The code generated by the plugin is very redundant and has inlines styles in almost every element, it makes you page html heavier and less flexible, if you need to adjust some styles later.

    You can use default editor, use shortcodes by the magic wand tool and you will still have the plugin functionality available.

    If you need further assistance please let us know.
    Best regards,
    Victoria

    #842452

    Dear Victoria,
    This is what I thought … using the default editor with the “magic wand” shortcodes, unfortunately not all shortcodes work with the default editor ie. “image with hotspots”.

    I already created a thread on the forum

    https://kriesi.at/support/topic/image-with-hotspots-does-not-work-with-default-wordpress-editor/

    In that case what can I do?

    Thank you for your help.

    Best regards,
    MD

    • This reply was modified 7 years, 3 months ago by midudek1.
    #842554

    Hi MD,

    You can have a test page, as a playground, enable Advanced Layout Builder debug. Here is how to do it: http://kriesi.at/documentation/enfold/enable-advanced-layout-builder-debug/
    Build images with hotspots and copy the shortcode generated to the page you need them.

    If you need further assistance please let us know.
    Best regards,
    Victoria

    #842786

    Dear Victoria,
    Thank you for your help … just to keep each issue in order lets discuss the “images with hotspots” in the topic below.

    https://kriesi.at/support/topic/image-with-hotspots-does-not-work-with-default-wordpress-editor/

    Concerning the issue from this thread … is there an easy fix?

    Best regards,
    MD

    #843003

    Hi MD,

    There does not seem to be an easy fix, but I’ll ask my colleagues to weigh in.

    Best regards,
    Victoria

    #843159
    This reply has been marked as private.
    #844131

    Hi MD,

    The issue have been answered in the other thread you made.

    Best regards,
    Nikko

    #844558

    Dear Nikko,
    It is different issue … I would not create 3 topics about the same :) Please read the details from the first post.

    Thank you for your time.

    Best regards,
    MD

    #846168

    Hi,

    Sorry I didn’t read the first post. Regarding the crayon syntax highlighter it seems to be conflicting with Avia Layout Builder, I would suggest not enabling ALB in pages/post that uses the plugin and use the shortcodes generated by the magic wand tool.

    Best regards,
    Nikko

    #846445

    Dear Nikko,
    Thank you for your reply!

    In that case what should I do if I want to use in the same web page “image with hotspots” which works only with ALB and “syntax highlighter” with does NOT work with ALB?

    Best regards,
    MD

    #847535

    Hi,

    There’s only one thing that can be done on that since there’s a bug with image with hotspots and that is to enable Avia Layout Debug http://kriesi.at/documentation/enfold/enable-advanced-layout-builder-debug/ it would be a bit inconvenient but on the page you want to publish don’t use ALB so you can use the syntax highlighter and at the same time create a draft page where you enable ALB use image with hotspots copy the generated code in the other page (page to be published).

    Best regards,
    Nikko

    #848785

    Dear Nikko,
    Thank you for your reply.

    This is another workaround and not real fix. This is not what you would
    expect from commercial product that you have to pay for …

    I will wait for the theme update, maybe it will be fixed one day.

    Thank you for your support.

    Best regards,
    MD

    #848869

    Hi MD,

    Yes, I could agree that this is a workaround since there is still a bug on the image with hotspots. But I am certain it will be fixed in future release of Enfold.

    Best regards,
    Nikko

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.