Hi,
I would like to paste some text preformatted with whitespaces, within which I want to highlight parts as bold.
I cannot highlight parts of the text within \{noformat} or \{code} sections, and when I paste the text as normal text then the whitespaces get lost upon pasting. This also happens when pasting within a paragraph that is formatted as monospaced.
How can I paste monospaced text while both retaining whitespaces and being able to highlight individual words within it afterwards?
I think Jorg's point is that he would like to paste some text formatted with whitespace. when you do this normally all your whitespace gets removed, which is really annoying!
one option is to paste your text in as wiki text, this preserves the whitespace but removes any other formatting which is equally annoying.
any recommendations on how to solve this?
For those looking for a workaround:
copy & paste into text editor (like Notepad++)
find and replace ' ' (space) with '\xA0' (use regex option)
It's something...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Good suggestion, @svdwijdeven. One can search the web to figure out how to type non-breaking space into one's favorite editor. In emacs, it's C-x 8 SPC.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The find and replace on spaces did not work for me. Confluence just displays all the supposed to be hidden text.
Example:
\xA0\xA0\xA0\xA0:file_folder:\xA0Competition\xA0and\xA0Teaming
\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0:file_folder:\xA0VTP\xA0Completed
ALSO Confluence is not recognizing the ":file_folder:" icons either.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I just wasted 1/2 an hour doing something that should be just control-V and done.
This is nonsensical that you strip spaces from preformatted text.
I have had many frustrations with your formatting, but this one is just dumb.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I can explain it only that Atlassian themselves doesn't use confluence internally, or they would have fixed this bullshit years ago.
Not sure what to think about company that does not use product they are developing.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Adding my +1 to this: Atlassian please sort out this basic editor deficiency.
I've just wasted far too long trying to figure out a workaround to pasting in a very long (indented) json file which I want to section up with "Expand" blocks where the whitespace is kept intact.
So many of your users are developers, and we "read" indentation as a basic way of communicating.
And I can't use the "code" macro for this: I want to colour code the text, and add comments on individual lines.
As mentioned above, I also want to expand and contract different parts of the file.
All this would be possible with one simple improvement: keep the leading whitespace on pasted text.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Why do we need workarounds and hacks? What has Atlassian been doing for the last 6 years? I have been a computer professional since 1983. In any given 6 year period companies have come and gone. Developed whole suites of apps and they screwed the pooch and gone out of business. I came to Confluence in 2017 from Sharepoint. Has Atlassian significantly improved the Confluence editing environment since 2014? I ran into this problem in the first week of using Confluence, cutting and pasting code, regression results, and other text to status documents I maintained for team reference. I doubt this is an uncommon activity.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have the same problem with version 7.7.2. My suggestion is to use browser's dev tools and paste formatted code directly into `<pre>...</pre>` element. I use https://www.online-toolz.com/tools/text-html-entities-convertor.php to convert html special chars:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To insert code that is correctly formatted you need to use the "Insert" (+) button on the top of the page and select "... Other macros". From there enter in "code" in the search area and select "Code Block". This will apply syntax highlighting to suit the type of code you are inserting (a selection of languages is available from this dialogue.)
If you just want to insert regular text, such as the output from a command such as "df", then choose "Plain Text".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This works only if you don't want to do any formatting of the text in the code box. But if you want to go back add bold or anything really, the code stubbornly stays "preformatted". If you try to change the formatting back to "paragraph" it strips the formatting again.
This is, what you call BS, Atlassian.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is my workaround:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This lately has been my go-to choice for hacks and workarounds when the UI has failed me (which is increasing with every product release)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm afraid they somehow think it's a feature. Someone clearly doesn't understand the word "preformatted"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Jörg, the functioning of the noformat and code macros is intended to strip the content within from any special formatting which includes font styling and text indentation, this behavior is the expected. In case you would like to highlight text within, you may use characters such as * asterisc or the # pound sign.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Guilherme Nedel 'this behavior is the expected'... No offense to you but I believe this to be a poor choice on Atlassian's part. Many of my colleagues use the terminal as their primary source of data to exchange with other managers within Jira. I often want to copy and paste data extracted from a tools output in the terminal into a jira ticket. The stripping of spaces is annoying and I agree with @davejohncole that Atlassian should realize this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Agreed. As a means of communicating with developers, I often copy/paste from my terminal output into JIRA or Confluence. Preserving whitespace is a must when I'm copying ascii tables from a script output.
Spaces should not be stripped out when copying into a preformatted block. That's the whole point of it being preformatted...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I would love to know what use case dictates that white space be removed from a copied block of preformatted text. It might help me be more understanding of this otherwise poor understanding of how your product is used.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Worst document editor possible for writing a technical manual or guide. You can't even change the tab or paragraph options after you put content into the page.
Any document editor of any type should allow for the original format of the copied text to retain its formatting with simple spaces or tabs.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please correct this and do no remove whitespace.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Guilherme Nedel is there a bug or feature request that has been submitted for this? If not, what is the process for one being submitted and accepted?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm with everyone on this one. We use Confluence for our internal documentation, and I need to often include sections of Python code. The fact that I cannot copy and paste it without losing all the spaces is extremely annoying. And I can see this is a complaint since 2014. Wow.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
FWIW, and for anyone who finds this discussion... I just discovered that if I copy my code from Visual Studio Code, the formatting is preserved when I paste it into Confluence. Don't know about other IDEs, but worth knowing.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.