• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Force rich CODE tag

Jake Bunce

Well-known member
This is a very simple addon that overrides the CODE tag so it is always rich. With this addon installed these two code blocks will do the same thing:


[code=rich]

[/code]


[code]

[/code]


It will always be rich even if you don't specify 'rich'.

Note that even with this addon installed you can still force a plain code block by using the PLAIN tag inside of the code block:


[plain]

[/plain]
 

Attachments

Here is what it looks with rich code
Rich (BB code):
// Hello.cpp
//
// Simple example of function bodies.
//

// Preprocessor for include files
#include <stdio.h> // C style I/O
#include <iostream> // C++ style I/O using operator overloading
using namespace std; // The C++ logical collection of functions

void hello_C()
{
printf("Hello Quantnet, C style\n");
}

void hello_CPP()
{
// Using (binary) operator overloading
cout << "Hello Quantnet, C++ style \n";
}

and with regular code
Code:
// Hello.cpp
//
// Simple example of function bodies.
//

// Preprocessor for include files
#include <stdio.h> // C style I/O
#include <iostream> // C++ style I/O using operator overloading
using namespace std; // The C++ logical collection of functions

void hello_C()
{
printf("Hello Quantnet, C style\n");
}

void hello_CPP()
{
// Using (binary) operator overloading
cout << "Hello Quantnet, C++ style \n";
}
 
Top Bottom