Losing formatting when switching between Source and WYSIWYG in CKEditor 4.2

2,061

For this instructions we assume your virtual server has IP: 83.170.XXX.XXX (replace with the real IP everywhere).

Then login via SSH as root

ssh [email protected]

Following these commands and instructions, update Ubuntu:

apt-get update 
apt-get upgrade 
apt-get install pptpd

Edit the file /etc/pptpd.conf and add:

localip 192.168.0.1 
remoteip 192.168.0.2-254

Insert the name servers in /etc/ppp/pptpd-options:

ms-dns 8.8.8.8
ms-dns 8.8.4.4

Create two test users in /etc/ppp/chap-secrets

user1 pptpd password1 * 
user2 pptpd password2 *

Setup routing for VPN server in /etc/sysctl.conf:

net.ipv4.ip_forward=1

Now edit /etc/rc.local (insert before exit 0 and replace 83.XXX.XXX.XXX with your VPS IP number):

iptables -t nat -A POSTROUTING -s 192.168.0.0/24 ! -d 192.168.0.0/24 -j SNAT --to-source 83.XXX.XXX.XXX

Restart and we are done.

shutdown -r now

Now you can log in with VPN over PPTP with either of the credentials you created before:

  • user1/password1
  • user2/password2

Source

This video will help you also

See this also

Share:
2,061

Related videos on Youtube

Boutros AbiChedid
Author by

Boutros AbiChedid

Updated on November 25, 2022

Comments

  • Boutros AbiChedid
    Boutros AbiChedid over 1 year

    I am using CKEditor version 4.2.2 Drupal module. When I toggle the 'Source' button (swithing between Plain Text and Rich Text) I end up losing some tags. It seems that the CKEditor rewrites the HTML code. I did quite a bit of search so far about this and I added in the "Custom JavaScript configuration" (in the configuration section of the CKEditor module), this line of code:

    config.allowedContent = true;

    With the above code I had partial success, now it leaves alone more tags but for the following code:

    <h2>404<i class="icon-file"></i></h2>

    CKEditor rewrites it as:

    <h2>404</h2>

    It removes the empty i tags. The i tag above is for font icons.

    How can I prevent CKEditor from rewriting the Markup when switching between Source View and WYSIWYG view?

    The problem I have is that multiple users edit the same document and some use WYSIWYG editor while others use the Plain text view. And you see how things get messy.

    Thanks.

    • Joel Peltonen
      Joel Peltonen over 10 years
      The tag <i> already has a historical semantic meaning as "italic". There's no real point in using it for an icon. Use some other tag and it'll be nicer.
    • AlfonsoML
      AlfonsoML over 10 years
      possible duplicate of CKeditor strips <i> Tag
  • Admin
    Admin over 10 years
    I have tried using Windows PPTP connection to my VPS server after following those procedures. Windows kept giving me this error: Error 619: A connection to the remote computer could not be established, so the port used for the connection was closed.
  • Boutros AbiChedid
    Boutros AbiChedid over 10 years
    Thanks Nenotlep for directing me to the right answer. To recap: I am using Font-Awesome, and I want to prevent the CKEditor 4.2 from removing the <i></i> tag. Here is the original solution: drupal.org/node/1908696 It works great for me.