Hi all,

I am quite new with Drupal... So my question might be extremely simple, but unfortunately I have not been able to find the information I require somewhere on the Internet!

What I want to do is the following, I want to find an easy way to include command line output to my Drupal stories. Something similar as is done on the following webpage:

http://articles.slicehost.com/2011/2/4/linux-migration-tips-and-tricks

So basically I want to make some tags which will replace the content between the tags with a div that has the specified CCS. But I am totally lost on how to actually do this...

I installed a WYSIWYG module, but I cannot seem to figure out whether that module is actually capable of what I am trying to achieve.

All advice is welcome!

St. Even

Comments

darrylmabini’s picture

If you add content you can choose "Full HTML" for text format and then put this for example

<pre>sudo rsync -e 'ssh -p 30000' -azPx --delete-after --exclude-from="/mnt/origin/home/demo/exclude.txt" /mnt/origin/ root@1.2.3.4:/
</pre>

and in your css file you can add this:

pre {
  background: #232323;
  color: #fff;
  margin: 10px 0;
  padding: 1em 10px;
  margin-bottom: 1.5em;
  border-top: solid 3px #000;
  border-left: solid 3px #000;
  border-right: solid 3px #ccc;
  border-bottom: solid 3px #ccc;
  overflow: auto;
}

hope this helps.

St. Even’s picture

Thanks, that was exactly what I was looking for!