• The page I am currently working in is not live but all of the posts/pages on my site have this issue so I have attached one that is live.

    Normally when I’m working in html I like to separate each line of code so I know what I am looking at. For example:

    <h3></h3>
    <ul >
    <li ></li >
    <li ></li >
    </ul >

    With the new Gutenberg editor it gets rid of every space that I have and pulls it into one blob of code. When I try to separate the code and then press save it automatically reverts back to the blob of code.

    This is frustrating to me because I want to be able to go into the code and quickly know exactly where I am when I am not using the visual editor. Is there something I am missing? Is there a way to lock the type so that is conforms to the spacing I have given it?

    • This topic was modified 6 years, 1 month ago by lmmaresca.
    • This topic was modified 6 years, 1 month ago by lmmaresca.
    • This topic was modified 6 years, 1 month ago by Steven Stern (sterndata). Reason: moved from requests/feedback to fixing, added backticks for code

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • I’d think HTML remark statements would work here but I don’t use Gutenberg yet so I’m not sure about how Gutenberg (The Block editor) deals with that kind of code.

    Give it a try?

    If you want to be able to create and edit posts as you had been doing, just use the Classic Editor Plugin:

    https://www.ads-software.com/plugins/classic-editor/

    Just jumping in here to add a piece of advice. If you are trying to use spacing in the editor – whether Classic or Gutenberg – it stands to reason that you should use CSS to style your paragraph, headings, lists, etc., so site wide, all of your content conforms to the same principles. I don’t know why you are trying to to use the visual view and then separating your content by using the return key, but I would revisit the styles in place for your content and update those styles with line-height settings and other common CSS rules. Then, you should never have to go into Text view at all.

    If you are not a developer and don’t know how to apply CSS to your problem, you can find a developer either locally in your area at a local WordPress Meetup, on jobs.wordpress.net or site’s like Upwork.

    Thread Starter lmmaresca

    (@lmmaresca)

    @tonyzeoli
    That’s not really what I was trying to say but thank you for the advice. I am not talking about styling my paragraphs. What I am saying is when I work in the text view (which I prefer) I would prefer to see my code like this
    <h3 ></h3 >
    <ul >
    <li ></li >
    <li ></li >
    </ul >

    instead of looking like this:

    <ul ><li ><strong >Flu vaccination can keep you from getting
    sick with flu. </strong >o Flu vaccine prevents millions of illnesses and flu-related doctor’s visits each year. For example, during 2016-2017, flu vaccination prevented an estimated 5.3 million influenza illnesses, 2.6 million influenza-associated medical visits, and 85,000 influenza-associated hospitalizations. <ul ><li >In seasons when the vaccine viruses matched circulating strains, flu vaccine has been shown to reduce the risk of having to go to the doctor with flu by 40 percent to 60 percent. <br > <br ></li ></ul ></li ><li >Flu vaccination can reduce the risk of flu-associated hospitalization for children, working age adults, and older adults. </ strong>o Flu vaccine prevents tens of thousands of hospitalizations each year. For example, during 2016-2017, flu vaccination prevented an estimated 85,000 flu-related hospitalizations. <ul ><li >A 2014 study showed that flu vaccine reduced children’s risk of flu-related pediatric intensive care unit (PICU) admission by 74% during flu seasons from 2010-2012. </li ></ul ><ul ><li >In
    recent years, flu vaccines have reduced the risk of flu-associated
    hospitalizations among adults on average by about 40%.</li ></ul >

    • This reply was modified 6 years, 1 month ago by lmmaresca.

    I see. I honestly don’t know the answer to your question as to why HTML does not soft wrap like you would see in an HTML editor like BBEdit. That would be a question for the folks at TinyMCE, who created the text editor that WordPress uses.

    I found this “nowrap” function that can be turned on/off here: https://www.tiny.cloud/docs-3x/reference/configuration/Configuration3x@nowrap/

    Probably open a ticket in the TinyMCE forums to get more specific help with this issue.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Cannot Separate Code in Back-end for Organization’ is closed to new replies.