atlassian


compact code block in confluence wiki


https://en.wikipedia.org/wiki/Unix_filesystem
In the above link wiki generates a "compact" inline code block, that is, the block stops at the last letter of the code instead of the whole line.
Is there a way to achieve this effect in confluence wiki?
OOTB, the only way to do this is with monospace text, but you don't get the background and border.
On Confluence Cloud, you have no other option.
If you are on Confluence Server, you could add a new user macro:
## Macro Name: decorate-inline-code
## Macro Title: Decorate Inline Code
## Macro has a body: N
## Body processing: n/a
## Output: HTML
##
## Developed by: David Simpson
## Date created: 2016-12-08
## Installed by: Your Name
## Simple user macro to decorate inline `<code>hello world</code>` blocks with a border & background color
## This should not decorate any `<pre><code>:(</code></pre> blocks
## #noparams
<style>
#content code:not([class]) { #* ignores <code> in the code macro *#
background: #fafafa;
border: 1px solid #ddd;
border-radius: 4px;
padding: 1px 4px;
}
</style>
This user macro can be added to the page once.
It finds all <code> blocks on a page and decorates them with a background and border
It ignores <code> in the code macro

Related Links

Commit Not Found on Bitbucket on PreReceiveRepositoryHook
Making text bold based on page tree depth in Confluence
Sql query to get all pages and their associated links for all confluence spaces
Atlassian Crowd Custom Connector Issue with AddUser - looking for Example Code and Documentation
WARNs in Confluence 6.0.1 after upgrade
compact code block in confluence wiki
Atlassian Confluence: Rest Api Create attachments Error 500 and Permission denied
Atlassian Git API Diff Commits using Git notation
Autogenerating atlassian confluence pagesusing JSDocs
Confluence atlassian change event listener
Enumerating user macro instances in Confluence
Add attachment to Jira using REST API
Update an open pull request successfully but get 409 conflict code
How do you reset HipChat Server Guest Console password
In Crowd is it possible to grant a user to JIRA and not to Confluence?
Allow a watch of dynamically created content in Confluence

Categories

HOME
porting
apache-jena
jax-rs
jelastic
oracle-apex-5
scripting
spring-session
character
joomla3.0
fosrestbundle
project-intu
package-managers
jmp
gmm
apache2.4
imagemap
itunes
jquery-multiselect
rpgle
exchangewebservices
tizen-tv
sqlpackage
utorrent
playstation-portable
fstream
hreflang
sammy.js
login-script
modalviewcontroller
xajax
protege4
watchman
cd
xdocreport
android-augmented-reality
recurrent-neural-network
demo
numberpicker
trigonometry
movilizer
smoothstate.js
memory-mapping
optimizely
mschart
launchctl
qtranslate
filehandle
rackspace-cloud
d3-force-directed
pybrain
mathcad
redbeard-ios
lrs
flex4.6
mta
model-associations
hclust
refinerycms
http-status-code-401
sklearn-pandas
nullable
invoke-sqlcmd
aspen
false-sharing
piracy-prevention
linklabel
iokit
django-urls
video-player
branch-and-bound
jsvc
aspectj-maven-plugin
jquery-forms-plugin
public-html
pseudo-class
device-tree
ss7
jammer
ice-cube
ebay-lms
inappsettingskit
kogrid
jquery-1.9
extreme-programming
saleslogix
multiplexing
floating-point-exceptions
twitterizer
collectionviewsource
mtu
nhprof
timertask
instantiationexception
asynchronous-wcf-call
fail-fast-fail-early

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App