• Icon: Suggestion Suggestion
    • Resolution: Answered
    • None
    • None
    • We collect Confluence feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      NOTE: This suggestion is for Confluence Server. Using Confluence Cloud? See the corresponding suggestion.

      noformat is useful, but really what users often want is preserve indentation of text documents.

            [CONFSERVER-2434] add wrap option to no format macro

            +1

            Nathanael Motz added a comment - +1

            BillA added a comment -

            Thank you for raising this issue. While I can see how this feature would be useful, we have no plans to implement it in the foreseeable future. In order to set expectations, we're closing this request now. Thanks again for your idea.

            BillA added a comment - Thank you for raising this issue. While I can see how this feature would be useful, we have no plans to implement it in the foreseeable future. In order to set expectations, we're closing this request now. Thanks again for your idea.

            Maybe a new CSS style that adds the following attribute: "word-wrap: break-word" would do the trick. (e.g. preformatted_wrap that inherits from preformatted)

            Jean-Marie White added a comment - Maybe a new CSS style that adds the following attribute: "word-wrap: break-word" would do the trick. (e.g. preformatted_wrap that inherits from preformatted)

            So, this is 5.5 years old... will anyone pick it up? Alternatively, any suggestions for a work-around that doesn't involve custom-macro writing?

            Steven Currie added a comment - So, this is 5.5 years old... will anyone pick it up? Alternatively, any suggestions for a work-around that doesn't involve custom-macro writing?

            I frequently insert error message snippets or full header emails and need "noformat" so @ \ * and # are not mangled. But the lines get too wide, and I also want word-wrap. Mozilla Seamonkey does this just fine, Firefox, Chrome and IE don't.

            Bryce Jira Nesbitt added a comment - I frequently insert error message snippets or full header emails and need "noformat" so @ \ * and # are not mangled. But the lines get too wide, and I also want word-wrap. Mozilla Seamonkey does this just fine, Firefox, Chrome and IE don't.

            AJ Coon added a comment -

            Any idea if this is a duplicate or just forgotten about?

            AJ Coon added a comment - Any idea if this is a duplicate or just forgotten about?

            JamesM added a comment -

            we currently use a custom macro 'norender' which does exactly this (inserting hard </br> ) because the html <pre> tags kill your current UI. (2.5.7)However, hundreds of pages with noformat cause the UI to be lost off the right-hand of the screen because people still use noformat.

            • request that the wrap=60 or wrap=80 be the default mode for noformat macro, with 'nowrap' or 'warp=x' being the option. I know that's not 100%backwards compatible, but I think of this as more of a bug fix for the 100's of 'too-wide' pages out there.
            • request no attempt to word-wrap, or depend on browser word-wrapping -> just hard wrap
            • request that the 'wrapped' lines be indented 4 spaces (thus wrapping at 56characters), and/or use some character in the left 'margin' indicating this is a wrapped line. a pipe or > for example.
            • this is almost 6 months old - any indication which version this might be assigned to?

            thanks.

            JamesM added a comment - we currently use a custom macro 'norender' which does exactly this (inserting hard </br> ) because the html <pre> tags kill your current UI. (2.5.7)However, hundreds of pages with noformat cause the UI to be lost off the right-hand of the screen because people still use noformat. request that the wrap=60 or wrap=80 be the default mode for noformat macro, with 'nowrap' or 'warp=x' being the option. I know that's not 100%backwards compatible, but I think of this as more of a bug fix for the 100's of 'too-wide' pages out there. request no attempt to word-wrap, or depend on browser word-wrapping -> just hard wrap request that the 'wrapped' lines be indented 4 spaces (thus wrapping at 56characters), and/or use some character in the left 'margin' indicating this is a wrapped line. a pipe or > for example. this is almost 6 months old - any indication which version this might be assigned to? thanks.

            That might work, yes. We wouldn't necessarily need to use the HTML macro, we would just insert linebreaks ourselves.

            The macro should probably default to wrapping at a certain width anyway, since too-wide noformat blocks make pages look really bad.

            Charles Miller (Inactive) added a comment - That might work, yes. We wouldn't necessarily need to use the HTML macro, we would just insert linebreaks ourselves. The macro should probably default to wrapping at a certain width anyway, since too-wide noformat blocks make pages look really bad.

            Charles,

            Couldn't we just add a wrap=60 option which hard wrapped the text inside at 60 characters? (printed then via the AbstractHtmlGeneratingMacro)

            M

            Mike Cannon-Brookes added a comment - Charles, Couldn't we just add a wrap=60 option which hard wrapped the text inside at 60 characters? (printed then via the AbstractHtmlGeneratingMacro) M

            This is quite tricky to do with HTML.

            There's a CSS "whitespace" property, but it only has three values: collapse whitespace and wrap text, collapse whitespace but don't wrap text, and don't collapse whitespace or wrap text. The "don't collapse whitespace but do wrap text" option was left out for some inexplicable reason.

            I guess to retain indenting, all we would need to do would be replace all leading whitespace in a line with   characters, like JIRA comments do already. (Subsequent whitespace would still be collapsed, since further use of   would also prevent line wrapping. Unless, maybe, we only  'd second and subsequent consecutive space characters)

            Charles Miller (Inactive) added a comment - This is quite tricky to do with HTML. There's a CSS "whitespace" property, but it only has three values: collapse whitespace and wrap text, collapse whitespace but don't wrap text, and don't collapse whitespace or wrap text. The "don't collapse whitespace but do wrap text" option was left out for some inexplicable reason. I guess to retain indenting, all we would need to do would be replace all leading whitespace in a line with   characters, like JIRA comments do already. (Subsequent whitespace would still be collapsed, since further use of   would also prevent line wrapping. Unless, maybe, we only  'd second and subsequent consecutive space characters)

              Unassigned Unassigned
              valentinedwv david valentine
              Votes:
              10 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: