Create Block Hide/Show Editor removes empty spanShow Product Category Item List in Static Block (cms...

Do authors have to be politically correct in article-writing?

Why publish a research paper when a blog post or a lecture slide can have more citation count than a journal paper?

What's a good word to describe a public place that looks like it wouldn't be rough?

Injecting creativity into a cookbook

Why do no American passenger airlines still operate dedicated cargo flights?

Can a hotel cancel a confirmed reservation?

It took me a lot of time to make this, pls like. (YouTube Comments #1)

How do you funnel food off a cutting board?

Porting Linux to another platform requirements

If I delete my router's history can my ISP still provide it to my parents?

How to avoid being sexist when trying to employ someone to function in a very sexist environment?

How to remove lines through the legend markers in ListPlot?

If I deleted a game I lost the disc for, can I reinstall it digitally?

CREATE ASSEMBLY System.DirectoryServices.AccountManagement.dll without enabling TRUSTWORTHY

How can animals be objects of ethics without being subjects as well?

Is there any other number that has similar propertie as 21?

Cookies - Should the toggles be on?

How to say "Brexit" in Latin?

How to deal with an incendiary email that was recalled

Is it a fallacy if someone claims they need an explanation for every word of your argument to the point where they don't understand common terms?

My cat mixes up the floors in my building. How can I help him?

Is a debit card dangerous in my situation?

How much mayhem could I cause as a sentient fish?

Digits in an algebraic irrational number



Create Block Hide/Show Editor removes empty span


Show Product Category Item List in Static Block (cms block)How to create Static block that shows an random imageShow phtml template in static blockremove empty space in static block in magento siteWYSIWYG editor in static block is deleting HTML codeTrying to add an icon to a CMS static block inline with a bannerHide static block on mobile view!How do I hide a static block on one of my category product pages?Magento 2 : Call Static block wysiwyg images not using editorProgrammatically create a wysiwyg editor for frontend magento 2.3













4















I created a new block in Magento 2.3 and want to use <span> to place some icons in front of a text.
I clicked on Hide/Show editor and pasted my code



<div class="item"><span class="top-icon fas fa-truck"></span><span class="headline-blue">Item 2</span><div class="text">Reason 2 text</div></div>



Changing back to the default editor it removes this empty <span class="top-icon fas fa-truck">.
If I replace the <span> with a <div>it will not delete this.



How can I use an empty <span> with my icons without inserting a &nbsp between the tags <span>&nbsp;</span>






Edit:

Sukumar Gorai suggested the workaround with a &nbsp;but it is only a workaround not a real solution.










share|improve this question




















  • 2





    Try <span class="top-icon fas fa-truck">&nbsp;</span>. It should work. I had the same issue and resolved it by adding &nbsp;

    – Sukumar Gorai
    Feb 21 at 13:41













  • That works/and worked during testing, but fells more like a workaround instead of a solution

    – Florian
    Feb 21 at 13:58











  • seems like a good solution to me. do you need this empty span? if yes, this is the way to go

    – Philipp Sander
    Feb 21 at 14:27











  • Would be more convinent to use, since I implement all icons with an empty span. @SukumarGorai could you answer the question with the comment you gave, so I can mark the answer as a working solution?

    – Florian
    Feb 21 at 14:36













  • Are you using with description field or any custom attribute?

    – Sukumar Gorai
    Feb 21 at 15:03
















4















I created a new block in Magento 2.3 and want to use <span> to place some icons in front of a text.
I clicked on Hide/Show editor and pasted my code



<div class="item"><span class="top-icon fas fa-truck"></span><span class="headline-blue">Item 2</span><div class="text">Reason 2 text</div></div>



Changing back to the default editor it removes this empty <span class="top-icon fas fa-truck">.
If I replace the <span> with a <div>it will not delete this.



How can I use an empty <span> with my icons without inserting a &nbsp between the tags <span>&nbsp;</span>






Edit:

Sukumar Gorai suggested the workaround with a &nbsp;but it is only a workaround not a real solution.










share|improve this question




















  • 2





    Try <span class="top-icon fas fa-truck">&nbsp;</span>. It should work. I had the same issue and resolved it by adding &nbsp;

    – Sukumar Gorai
    Feb 21 at 13:41













  • That works/and worked during testing, but fells more like a workaround instead of a solution

    – Florian
    Feb 21 at 13:58











  • seems like a good solution to me. do you need this empty span? if yes, this is the way to go

    – Philipp Sander
    Feb 21 at 14:27











  • Would be more convinent to use, since I implement all icons with an empty span. @SukumarGorai could you answer the question with the comment you gave, so I can mark the answer as a working solution?

    – Florian
    Feb 21 at 14:36













  • Are you using with description field or any custom attribute?

    – Sukumar Gorai
    Feb 21 at 15:03














4












4








4


1






I created a new block in Magento 2.3 and want to use <span> to place some icons in front of a text.
I clicked on Hide/Show editor and pasted my code



<div class="item"><span class="top-icon fas fa-truck"></span><span class="headline-blue">Item 2</span><div class="text">Reason 2 text</div></div>



Changing back to the default editor it removes this empty <span class="top-icon fas fa-truck">.
If I replace the <span> with a <div>it will not delete this.



How can I use an empty <span> with my icons without inserting a &nbsp between the tags <span>&nbsp;</span>






Edit:

Sukumar Gorai suggested the workaround with a &nbsp;but it is only a workaround not a real solution.










share|improve this question
















I created a new block in Magento 2.3 and want to use <span> to place some icons in front of a text.
I clicked on Hide/Show editor and pasted my code



<div class="item"><span class="top-icon fas fa-truck"></span><span class="headline-blue">Item 2</span><div class="text">Reason 2 text</div></div>



Changing back to the default editor it removes this empty <span class="top-icon fas fa-truck">.
If I replace the <span> with a <div>it will not delete this.



How can I use an empty <span> with my icons without inserting a &nbsp between the tags <span>&nbsp;</span>






Edit:

Sukumar Gorai suggested the workaround with a &nbsp;but it is only a workaround not a real solution.







admin static-block magento2.3






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 21 at 14:02







Florian

















asked Feb 21 at 13:38









FlorianFlorian

12816




12816








  • 2





    Try <span class="top-icon fas fa-truck">&nbsp;</span>. It should work. I had the same issue and resolved it by adding &nbsp;

    – Sukumar Gorai
    Feb 21 at 13:41













  • That works/and worked during testing, but fells more like a workaround instead of a solution

    – Florian
    Feb 21 at 13:58











  • seems like a good solution to me. do you need this empty span? if yes, this is the way to go

    – Philipp Sander
    Feb 21 at 14:27











  • Would be more convinent to use, since I implement all icons with an empty span. @SukumarGorai could you answer the question with the comment you gave, so I can mark the answer as a working solution?

    – Florian
    Feb 21 at 14:36













  • Are you using with description field or any custom attribute?

    – Sukumar Gorai
    Feb 21 at 15:03














  • 2





    Try <span class="top-icon fas fa-truck">&nbsp;</span>. It should work. I had the same issue and resolved it by adding &nbsp;

    – Sukumar Gorai
    Feb 21 at 13:41













  • That works/and worked during testing, but fells more like a workaround instead of a solution

    – Florian
    Feb 21 at 13:58











  • seems like a good solution to me. do you need this empty span? if yes, this is the way to go

    – Philipp Sander
    Feb 21 at 14:27











  • Would be more convinent to use, since I implement all icons with an empty span. @SukumarGorai could you answer the question with the comment you gave, so I can mark the answer as a working solution?

    – Florian
    Feb 21 at 14:36













  • Are you using with description field or any custom attribute?

    – Sukumar Gorai
    Feb 21 at 15:03








2




2





Try <span class="top-icon fas fa-truck">&nbsp;</span>. It should work. I had the same issue and resolved it by adding &nbsp;

– Sukumar Gorai
Feb 21 at 13:41







Try <span class="top-icon fas fa-truck">&nbsp;</span>. It should work. I had the same issue and resolved it by adding &nbsp;

– Sukumar Gorai
Feb 21 at 13:41















That works/and worked during testing, but fells more like a workaround instead of a solution

– Florian
Feb 21 at 13:58





That works/and worked during testing, but fells more like a workaround instead of a solution

– Florian
Feb 21 at 13:58













seems like a good solution to me. do you need this empty span? if yes, this is the way to go

– Philipp Sander
Feb 21 at 14:27





seems like a good solution to me. do you need this empty span? if yes, this is the way to go

– Philipp Sander
Feb 21 at 14:27













Would be more convinent to use, since I implement all icons with an empty span. @SukumarGorai could you answer the question with the comment you gave, so I can mark the answer as a working solution?

– Florian
Feb 21 at 14:36







Would be more convinent to use, since I implement all icons with an empty span. @SukumarGorai could you answer the question with the comment you gave, so I can mark the answer as a working solution?

– Florian
Feb 21 at 14:36















Are you using with description field or any custom attribute?

– Sukumar Gorai
Feb 21 at 15:03





Are you using with description field or any custom attribute?

– Sukumar Gorai
Feb 21 at 15:03










1 Answer
1






active

oldest

votes


















0














This seems to be issue with editor in Magento. You can try



<span class="top-icon fas fa-truck">&nbsp;</span>


instead of



<span class="top-icon fas fa-truck"></span>


I had the same issue and resolved it by adding &nbsp;



Hope this helps!






share|improve this answer























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "479"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f262872%2fcreate-block-hide-show-editor-removes-empty-span%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    This seems to be issue with editor in Magento. You can try



    <span class="top-icon fas fa-truck">&nbsp;</span>


    instead of



    <span class="top-icon fas fa-truck"></span>


    I had the same issue and resolved it by adding &nbsp;



    Hope this helps!






    share|improve this answer




























      0














      This seems to be issue with editor in Magento. You can try



      <span class="top-icon fas fa-truck">&nbsp;</span>


      instead of



      <span class="top-icon fas fa-truck"></span>


      I had the same issue and resolved it by adding &nbsp;



      Hope this helps!






      share|improve this answer


























        0












        0








        0







        This seems to be issue with editor in Magento. You can try



        <span class="top-icon fas fa-truck">&nbsp;</span>


        instead of



        <span class="top-icon fas fa-truck"></span>


        I had the same issue and resolved it by adding &nbsp;



        Hope this helps!






        share|improve this answer













        This seems to be issue with editor in Magento. You can try



        <span class="top-icon fas fa-truck">&nbsp;</span>


        instead of



        <span class="top-icon fas fa-truck"></span>


        I had the same issue and resolved it by adding &nbsp;



        Hope this helps!







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 1 hour ago









        Sukumar GoraiSukumar Gorai

        6,7003629




        6,7003629






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Magento Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f262872%2fcreate-block-hide-show-editor-removes-empty-span%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            “%fieldName is a required field.”, in Magento2 REST API Call for GET Method Type The Next...

            How to change City field to a dropdown in Checkout step Magento 2Magento 2 : How to change UI field(s)...

            變成蝙蝠會怎樣? 參考資料 外部連結 导航菜单Thomas Nagel, "What is it like to be a...