• Hi,

    I have some problem with formatting text in classic editor and Astra theme (already check with default themes and all it’s ok).

    When I edit a text and change a paragraph with a line break and save the post, Astra automatically add a code to my text:

    <span style="font-size: 16px;">

    This happens with every line I changed with a line break. This is very annoying because it changed my css rules and I have to manually remove all the span tags.

    Do you have any idea how to fix it?

    Thank you!

    The page I need help with: [log in to see the link]

Viewing 12 replies - 1 through 12 (of 12 total)
  • Hi @graficavillcom

    Thank you for reaching out to us.

    I have tried to reproduce and debug the issue further on our test site, but unable to reproduce it.

    So, can you please share a screencast about the configuration step/how to reproduce the issue, which will help us to provide you with a better solution?

    With Regards
    Humayon

    Thread Starter Imagegrafica.villcom

    (@graficavillcom)

    Hi @humayonk

    Sure, you can find screencast here: https://www.dropbox.com/scl/fi/46ag2psu5ezszw6ut3kci/Registrazione-schermo-2026-02-05-alle-10.29.23.mov?rlkey=1b7lzmiyjmq5zavble5sqnxgi&dl=0

    Screencast was made with all plugins deactivated except for classic editor and maintenance mode (already checked).

    As further info, I can tell you that yesterday I tried to write a post with block editor and line-breaks worked perfectly. So there is a compatibility problem with Astra and classic editor.

    If can help, I also tried to ask help to Chatgpt and it tells that:

    Yes, what you are describing is a known behavior of Astra (especially with the Classic Editor): when you insert a line break (<br>), the theme automatically intervenes in the content and “wraps” it with:

    <span style="font-size: 16px;">

    to apply the default font size.
    However, this pollutes the HTML and breaks your CSS rules, as you have noticed.

    🔴 Why this happens

    Astra applies font sizes to inline text using dynamic JavaScript/CSS.
    When you use <br> inside a paragraph, the system tries to “normalize” the text and ends up inserting those <span> tags.

    This does not happen with normal <p> tags.

    So the issue comes from:

    Classic Editor + <br> + Astra typography system

    Best regards

    Thread Starter Imagegrafica.villcom

    (@graficavillcom)

    Another update: I found that this issue is also with editor block of Elementor.

    Hi @graficavillcom

    Thank you for writing back to us.

    I have tested your reported issue in our test server by following the screencast you’ve shared with us; however, it appears that we aren’t facing the same behaviour similar to this reference screencast.

    Also, can you please try one more time after updating the Astra theme to the latest version?

    With Regards
    Humayon

    Thread Starter Imagegrafica.villcom

    (@graficavillcom)

    Hi @humayonk ,

    Thank you. Sadly Astra is already updated to the latest version.

    I really don’t know to to do. I will try to reproduce the issue offline with MAMP too.

    Hello @graficavillcom

    Thank you for your reply.

    Yes, please try with the MAMP/offline and let us know your findings, as we haven’t received such a report from other users, nor have we faced such an issue while testing.

    Alternatively, please try in a fresh WP and Astra theme installation as well.

    With Regards
    Humayon

    Thread Starter Imagegrafica.villcom

    (@graficavillcom)

    Hi @humayonk,

    I tried also with MAMP and fresh WP and Astra, there is the same issue.

    Please let me know if you can reproduce it and find fix it.

    Hello @graficavillcom

    Thank you for your reply.

    Well, I’m still unable to reproduce the issue.

    Can you please share what keyboard shortcut/key you’re pressing while removing the extra spacing in the editor?

    With Regards
    Humayon

    Thread Starter Imagegrafica.villcom

    (@graficavillcom)

    Hi @humayonk ,

    Sure, I’m pressing regular line break

    Shift + Enter

    Here my steps to reproduce the issue:
    1. Only Classic Editor activated with Astra theme;
    2. Write a few lines with paragraphs (Enter button) inside a post and save;
    3. Change that lines replacing paragraphs with line breaks (Shift + Enter) and then save the post.
    4. Now in that lines appears the span code with font size 16px.

    As update, yesterday I tested all kind of fonts with some different dimensions, also all Astra defaults, but nothing changed. When I save the post after typing the line break, there is always the same code into that lines:

    <span style="font-size: 16px;">

    And always 16px regardless of the font size I set.

    The tests were made both online with different hosting and domains (we have a lot of Astra installations) and offline with MAMP.

    Hi @graficavillcom

    Thank you for sharing the details with us.

    We have tested again by following the instructions you’ve shared with us, and still we’re unable to reproduce the same on our testing site, similar to this reference screencast.

    As we have tried all other steps and basic debugging initially in that case, can you please get in touch here with our team?

    With Regards
    Humayon

    Thread Starter Imagegrafica.villcom

    (@graficavillcom)

    Hi @humayonk

    It’s a real mistery!

    Of course I will get in touch with Astra theme as soon as possible.

    Thank you!

    Hello @graficavillcom

    You’re welcome.

    Also, feel free to share the findings with us and let us know if you need further assistance on this.

    Once the issue is resolved, feel free to mark the thread as resolved.

    With Regards
    Humayon

Viewing 12 replies - 1 through 12 (of 12 total)

You must be logged in to reply to this topic.