Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug / Line Breaks in Code Blocks using Enlighter Plugin on Elementor #380

Open
2 tasks done
lyc233nb opened this issue Jun 4, 2024 · 5 comments
Open
2 tasks done

Comments

@lyc233nb
Copy link

lyc233nb commented Jun 4, 2024

WordPress Version

6.5.3

Enlighter Version

latest

Editing method

Text editor (e.g. comments) with pre tags

What happened?

Hello [Developer/Support Team],

I hope this message finds you well. I am reaching out to report an issue I’ve encountered while using the Enlighter plugin to display code blocks within Elementor on my WordPress site.

Problem Description:
When I format my code using the Enlighter plugin, it seems to be converted correctly in the text editor. However, upon viewing the page live, the line breaks in my code are replaced with
tags, disrupting the intended formatting of the code. Here's an example of how my code appears within the Elementor text editor:

/*
* This is a multi-line comment
*/

Expected Result:
The code should be displayed with proper line breaks and formatting when rendered on the website.

Actual Result:
The rendered code displays
tags where the line breaks should be, resulting in a cluttered code block.

Troubleshooting Steps Taken:

I have checked the Enlighter plugin settings for any line breaking/formatting options and adjusted them accordingly, but the issue persists.
I have made sure not to use the visual editor in Elementor after pasting my code into the text module to avoid any auto-formatting issues.
I am not sure whether this is related to a CSS conflict, JavaScript issue, or a misconfiguration within the plugin or Elementor. I would greatly appreciate any guidance or assistance you could provide in resolving this matter. Furthermore, if there is any additional information or access required to diagnose this issue, please let me know, and I'll be happy to comply.

Thank you for your time and assistance.

Best regards,
Yuchen Lu

What browsers are you seeing the problem on?

No response

Your settings (debug)

{
    "translation-enabled": true,
    "enlighterjs-init": "inline",
    "enlighterjs-assets-js": true,
    "enlighterjs-assets-themes": true,
    "enlighterjs-assets-themes-external": true,
    "enlighterjs-selector-block": "pre.EnlighterJSRAW",
    "enlighterjs-selector-inline": "code.EnlighterJSRAW",
    "enlighterjs-indent": 4,
    "enlighterjs-ampersandcleanup": true,
    "enlighterjs-linehover": true,
    "enlighterjs-rawcodedbclick": true,
    "enlighterjs-textoverflow": "scroll",
    "enlighterjs-linenumbers": true,
    "enlighterjs-theme": "enlighter",
    "enlighterjs-retaincss": false,
    "enlighterjs-language": "generic",
    "toolbar-visibility": "show",
    "toolbar-button-raw": true,
    "toolbar-button-copy": true,
    "toolbar-button-window": true,
    "toolbar-button-enlighterjs": true,
    "tinymce-backend": true,
    "tinymce-frontend": true,
    "tinymce-formats": true,
    "tinymce-autowidth": false,
    "tinymce-tabindentation": true,
    "tinymce-keyboardshortcuts": false,
    "tinymce-font": "sourcecodepro",
    "tinymce-fontsize": "0.7em",
    "tinymce-lineheight": "1.4em",
    "tinymce-color": "#000000",
    "tinymce-bgcolor": "#f9f9f9",
    "gutenberg-backend": true,
    "quicktag-backend": true,
    "quicktag-frontend": true,
    "quicktag-mode": "html",
    "shortcode-mode": "modern",
    "shortcode-inline": false,
    "shortcode-type-generic": false,
    "shortcode-type-language": false,
    "shortcode-type-group": false,
    "shortcode-filter-content": false,
    "shortcode-filter-excerpt": false,
    "shortcode-filter-widget": false,
    "shortcode-filter-comment": false,
    "shortcode-filter-commentexcerpt": false,
    "gfm-enabled": true,
    "gfm-inline": false,
    "gfm-language": "generic",
    "gfm-filter-content": true,
    "gfm-filter-excerpt": true,
    "gfm-filter-widget": true,
    "gfm-filter-comment": false,
    "gfm-filter-commentexcerpt": false,
    "compat-enabled": true,
    "compat-crayon": true,
    "compat-codecolorer": false,
    "compat-type1": true,
    "compat-type2": true,
    "compat-filter-content": true,
    "compat-filter-excerpt": true,
    "compat-filter-widget": false,
    "compat-filter-comment": false,
    "compat-filter-commentexcerpt": false,
    "cache-custom": true,
    "cache-path": "",
    "cache-url": "",
    "dynamic-resource-invocation": true,
    "ext-infinite-scroll": false,
    "jetpack-gfm-code": false,
    "ext-ajaxcomplete": true,
    "bbpress-shortcode": true,
    "bbpress-markdown": true
}

I've read the docs/troubleshooting guidelines

  • I confirm that i've completely read and followed the troubleshooting guide!

The bug/issues appears in a clean WordPress environment

  • I confirm that the bug/issues happens within a clean WordPress enviroment!
@lyc233nb
Copy link
Author

lyc233nb commented Jun 4, 2024

1

@lyc233nb
Copy link
Author

lyc233nb commented Jun 4, 2024

sorry my environment is clean wordpress plus elementor without any other pplugin

@lyc233nb
Copy link
Author

lyc233nb commented Jun 4, 2024

the problem was in the text editor in the elementor

@lyc233nb
Copy link
Author

lyc233nb commented Jun 4, 2024

it is with br tags sorry for the markdown rendering

@AndiDittrich
Copy link
Member

official Enlighter only supports TinyMCE and Gutenberg Editor out of the box. Elementor (a commercial plugin) is neither tested nor supported (i didn't own any license).
therefore i would recommend you to ask the Elementor team for support - technically it's some kind of rendering issue caused by elementor..sry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants