-
AuthorPosts
-
November 28, 2014 at 1:29 pm #359546
I have recently changed themes, from Divi to Enfold and am really happy with the change.
I am facing one small issue. When using the crayon highlighter everything works in the page preview, but as soon as I publish the page the highlighting does not work for that page, when I go back to preview its fine, but on the published page crayon is not highlighting.
Strange thing is that on old pages that I have not edited yet, still made under Divi, the highlighting works fine. As soon as I update the page in any way, the crayon highlighting stops working.
What could be the issue?
To highlight the code I use the following inside a text block content element (add it to in the text editor), I do not use the “add crayon code” button from the visual editor:
< pre class=”lang:js decode:true ” >
code
code
< / pre >November 28, 2014 at 9:27 pm #359888Hi heinrichvk!
Is this a plugin your using? https://wordpress.org/plugins/crayon-syntax-highlighter/
You shouldn’t add code to the textblock element. Instead use the codeblock element.
Go ahead and send us a link and we’ll take a look. You can set your reply as private if you wish.
Cheers!
Elliott- This reply was modified 10 years ago by Elliott.
December 1, 2016 at 11:41 am #719189Hi,
I know it’s an old topic but I have the same issue. Any hints how to fix or find the issue?A codeblock element also does not work.
December 1, 2016 at 12:28 pm #719207From Crayon I get this error:
[Crayon Syntax Highlighter Log Entry - 10:21:44 AM - 01 Dec 2016] [SYSTEM LOG] 'Upload directory is empty: cannot load languages.' [SYSTEM LOG] 'The resource directory is missing, should be at \'\'.' [CrayonUtil::lines()] 'Cannot read lines at \'default/default.txt\'.'
Crayon Version 2.8.4
WordPress 4.6.1
Enfold Theme Version: 3.8After some research it seems that the JS is not a problem but the PHP scripts already fail to prepare the output.
- This reply was modified 8 years ago by maincomputer.
December 6, 2016 at 5:23 am #720816Hi,
Did you disable the plugin? I don’t see the errors in the console. Please try another “syntax” plugins.
// https://wordpress.org/plugins/syntaxhighlighter/
// https://wordpress.org/plugins/wp-syntax/Best regards,
IsmaelDecember 6, 2016 at 11:26 am #720927I tried the first one. There is a bug where the Visual editor always adds a pre tag which leads to broken styles.
The second one does not work at all.
The plugin is still activated. You will see that the highlighing works in preview mode. The error is only in the admin console in the backend.
- This reply was modified 8 years ago by maincomputer.
December 9, 2016 at 5:23 am #722314 -
AuthorPosts
- You must be logged in to reply to this topic.