Page tree
Skip to end of metadata
Go to start of metadata

By applying Code Mirror, you can more easily edit codes at 'view source' of the Editor.

'view source' without Code Mirror'view source' with Code Mirror

You may apply Code Mirror by either downloading js file and css file from Code Mirror website and adding the corresponding path or using CDN.
Or, you may also use codemirror script file included in externals directory in SynapEditor package.

Using package externals

Using externals codeMirror script file under package

<!-- code mirror -->
<script type="text/javascript" src='../resource/codemirror.min.js'></script>
<script type="text/javascript" src="../resource/xml.min.js"></script>
<link rel='stylesheet' href='../resource/codemirror.min.css'>

Application through CDN

The the following script to <head> tag in html file in which the Editor is installed.

<!-- code mirror -->
<script type="text/javascript" src=''></script>
<script type="text/javascript" src=""></script>
<link rel='stylesheet' href=''>
  • No labels