This is on the "Edit HTML" button of your WYSIWYG editor.. I found it simple and that's why I am sharing this with you.
.....
var showSource = true; (Automates the toggling for the same button)
function toggleSource() {
if ( showSource ) { //(Make the code editable inside a textarea)
iView.document.body.innerHTML =
'<textarea name="txtSourceCode" style="width:100%;height:700px">' +
iView.document.body.innerHTML + "</textarea>" ;
} else { //(Again read just the text area to show the content in HTML display format)
iView.document.body.innerHTML = iView.txtSourceCode.value;
}
showSource = !showSource; (This switch will make the reverse action code-display or display-code mode)
}
I am using Amazon EC2 for hosting this.. I feel it is the best option one could have for back up and all other purpose.
1 - First create a SVN user
useradd svn
su - svn
cd ~
2 - Get the latest version of subversion
wget http://subversion.tigris.org/downloads/subversion-1.5.5.tar.bz2
bzip2 -d subversion-1.5.5.tar.bz2
tar -xf subversion-1.5.5.tar
mv subversion-1.5.5 subversion
cd subversion
3 - Put the necessary libraries including the zlib compression and point to your apache installation path
yum install zlib-devel
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/mnt/install/apache/lib
4 - Build Svn
./configure --with-apr=/mnt/install/apache --with-apr-util=/mnt/install/apache
make
make install
5 - Backup unnessary files
rm subversion-1.5.5.tar
mv subversion subversion.backup
6 - Create a project called proj1
cd ~svn
su svn
svnadmin create proj1
7 - First create a SVN user
useradd svn
8 - First create a SVN user
useradd svn
9 - In EC2 I prefer /mnt space as it has got 150GB. It stops eating up my primary harddisk. Make a link as root
su - root
mkdir -p /mnt/svn
mv ~svn/proj1 /mnt/svn
cd ~svn; su svn
ln -s /mnt/svn/proj1 proj1
10 - Remove anonymous access and put proper user for access
mv svnserve.conf svnserve.conf.orig
echo [general] > svnserve.conf
echo anon-access=none >> svnserve.conf
echo password-db=passwd >> svnserve.conf
echo [sasl] >> svnserve.conf
vi proj1/conf/passwd # add necessary users and password
11 - Start the server in demon mode. It runs in port 3690. Punch a hold in EC2 firewall
svnserve -d -r ~svn
netstat --numeric-ports -ap | grep 3690
tools\ec2-api-tools\bin\ec2-authorize default -p 3690
12 - Add repository to Eclipse SVN and have a good night sleep.
# Add in eclipse the url - svn://www.ruklook.com/proj1