MirrorSharp is a code editor built on Roslyn and CodeMirror</body></html>
Перейти к файлу
Andrey Shchekin 05a3c8ad9b [gh-47] Another image improvement. 2017-01-02 23:43:48 +13:00
MirrorSharp.AspNetCore Corrected ReSharper warnings. 2016-09-18 19:37:36 +12:00
MirrorSharp.AspNetCore.Demo [closes gh-18] Implemented explicit sync-check command (Ctrl+Shift+Y). 2016-12-25 11:29:26 +13:00
MirrorSharp.Benchmarks [closes gh-39] Committing completion with '(' will now trigger signature help. 2016-12-30 15:04:48 +13:00
MirrorSharp.Common [gh-47] Initial README. 2017-01-02 22:37:28 +13:00
MirrorSharp.Owin [gh-47] Initial README. 2017-01-02 22:37:28 +13:00
MirrorSharp.Owin.Demo [closes gh-35] Added support for suggestion mode. 2016-12-28 14:31:46 +13:00
MirrorSharp.Tests [ashmind/TryRoslyn#44] Added Visual Basic support (client-driven switch only). Some test optimizations. Options+update bugfix. 2017-01-02 16:20:58 +13:00
MirrorSharp.WebAssets [ashmind/TryRoslyn#44] Added Visual Basic support (client-driven switch only). Some test optimizations. Options+update bugfix. 2017-01-02 16:20:58 +13:00
📄readme [gh-47] Another image improvement. 2017-01-02 23:43:48 +13:00
.editorconfig Initial prototype. 2016-09-10 22:04:16 +12:00
.gitignore Simplified CSS, fixed bug when integrating with latest CodeMirror. 2016-12-23 20:00:44 +13:00
MirrorSharp.sln Improved FastJsonWriter and added tests and benchmarks. 2016-10-08 19:57:46 +13:00
MirrorSharp.sln.DotSettings [closes gh-44] Added command to force signature help on Ctrl+Shift+Space. 2016-12-30 15:38:55 +13:00
README.md [gh-47] Initial README. 2017-01-02 22:37:28 +13:00
appveyor.yml [gh-50] Build fixes. 2017-01-02 18:47:16 +13:00
dotnet-pack-all.bat [gh-50] Build fixes. 2017-01-02 18:47:16 +13:00
global.json Major restructuring. 2016-09-13 21:09:56 +12:00

README.md

Overview

MirrorSharp is a code editor <textarea> built on Roslyn and CodeMirror.

Features

Code completion

Code completion

Signature help

Signature help

Quick fixes

Quick fixes

Diagnostics

Diagnostics

Usage

You'll need the following:

  • MirrorSharp.Owin (classic .NET) or MirrorSharp.AspNetCore (.NET Core) on the server
  • mirrorsharp.js — client library that provides the user interface

Server

MirrorSharp.Owin

NuGet: Install-Package MirrorSharp.Owin -Pre
Once installed, call app.UseMirrorSharp() in your OWIN startup.

MirrorSharp.AspNetCore

TODO: this library is not published yet.

Client

TODO: this library is not published yet.

Use one of the following:

  • npm install mirrorsharp --save
  • bower install mirrorsharp --save

CSS

If you are using LESS, CSS references can be done automatically by including mirrorsharp/mirrorsharp.less. Otherwise, make sure to include the following:

  1. codemirror/lib/codemirror.css
  2. codemirror/addon/lint/lint.css
  3. codemirror/addon/hint/show-hint.css
  4. codemirror-addon-lint-fix/addon/lint-fix/lint-fix.css
  5. mirrorsharp/mirrorsharp.css

JS

JS can be done automatically since mirrorsharp has proper requires. Otherwise:

  1. codemirror/lib/codemirror.js
  2. codemirror/mode/clike/clike.js
  3. codemirror/addon/lint/lint.js
  4. codemirror/addon/hint/show-hint.js
  5. codemirror-addon-lint-fix/addon/lint-fix/lint-fix.js
  6. mirrorsharp/mirrorsharp.js

Usage

Once referenced, you can do the following:

mirrorsharp(textarea, { serviceUrl: 'wss://your_app_root/mirrorsharp' })

If you re not using HTTPS, you'll likely need ws:// instead of wss://.

Note that textarea is an actual textarea element, and not a CSS selector or jQuery object.

API

TODO. In general the idea is that "it just works", however customization is a goal and some options are already available.