How to prevent CKEditor from deleting <and> (more or less)

Each time I enter < or > in the CKEditor window, save, and then return to it, CKEditor replaces them with what was printed in brackets and the accompanying end of the tag. For example: if I type <configuration details> , CKEditor will assume that this is an HTML tag and put <configuration details></configuration details> in the html source, thereby completely excluding it from the text. Argh!

Any ideas?

+6
source share
2 answers

Yes, this is a real pain.

The only workaround I have found so far is to use

 CKEDITOR.instances.myInst.setData(myData); 

It actually handles properly shielded vs. unescaped html, so your <and> will exit correctly, both smaller and larger than the characters, instead of being interpreted as markup.

I have not yet found a way to make this work with embedded data. The workaround for setData () is pretty awkward.

0
source

The best I came up with is to use a Unicode character, which is dimly smaller than the ish sign, or something functionally reminiscent of, for example, the left arrow can indicate a redirection.

You will need to have an open page / notepad with open characters so that you can cut and paste (or find / replace) when working on your vital documents.

Here are some characters I received to fill out:

⨞ ◀ ◄ ⇦ ⍃ ❮ ⍄ ► ▶ ▷ ❭ ˃

Any of these may or may not work depending on browser support, OS and / or unicode application and (incorrect) configuration.

Copy and google search to find unicode / html / long-description (for example, 'MODIFIER LETTER RIGHT ARROWHEAD' (U+02C3) ) for any character and use this information to search for matching or matching characters.

Here are some examples. For full viewing, you will need suitable browser and 3D glasses.

  • Everything is good!

mysql -u root -p xxxxxx ❮​ /usr/share/icinga2/schema.sql

  • Not much, but it's a good conversation starter:

◄configuration details►◄/configuration details►

  • Maybe even

mysql -u root -p passw*t ◄ nerf_ischemia.sql

But wow, this is disgusting. It is still better than having less than a sign, and all after it is lost.

There may be a better character or even crack the image infix. But this is my quick fix. In any case, the applicability of this solution will depend on various factors, including tolerance to characteristic inaccuracies, as well as the previously mentioned OS, software, browser support with a weird-unicode symbol.

0
source

All Articles