GithubHelp home page GithubHelp logo

website's Introduction

CodeMirror 5

NOTE: CodeMirror 6 exists, and is more mobile-friendly, more accessible, better designed, and much more actively maintained.

Build Status

CodeMirror is a versatile text editor implemented in JavaScript for the browser. It is specialized for editing code, and comes with over 100 language modes and various addons that implement more advanced editing functionality. Every language comes with fully-featured code and syntax highlighting to help with reading and editing complex code.

A rich programming API and a CSS theming system are available for customizing CodeMirror to fit your application, and extending it with new functionality.

You can find more information (and the manual) on the project page. For questions and discussion, use the discussion forum.

See CONTRIBUTING.md for contributing guidelines.

The CodeMirror community aims to be welcoming to everybody. We use the Contributor Covenant (1.1) as our code of conduct.

Installation

Either get the zip file with the latest version, or make sure you have Node installed and run:

npm install codemirror@5

NOTE: This is the source repository for the library, and not the distribution channel. Cloning it is not the recommended way to install the library, and will in fact not work unless you also run the build step.

Quickstart

To build the project, make sure you have Node.js installed (at least version 6) and then npm install. To run, just open index.html in your browser (you don't need to run a webserver). Run the tests with npm test.

website's People

Contributors

40thieves avatar a99us avatar aatauil avatar adrianheine avatar banqinghe avatar ddrone avatar delphicoder avatar emmanuel-ferdman avatar gabalafou avatar gleiderr avatar idleberg avatar ivov avatar jameskerr avatar jdbruxelles avatar jessuni avatar jfranty avatar kamagatos avatar keltono avatar marijnh avatar microbit-matt-hillsdon avatar mustafa0x avatar not-my-profile avatar programingjd avatar radian628 avatar ruibaby avatar stonecypher avatar truell20 avatar vincentbernat avatar wesinator avatar yiannisha avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

website's Issues

description in examples/collab hard to understand

LINK

The reason local updates are confirmed through the same mechanism as remote updates is that we want to handle the case where the push request successfully arrives at the authority, but the network fails before the response comes back to the peer. If confirming local changes only happened on pull, it would be hard to resynchronize with the authority after such an event.

In this "If confirming local changes only happened on pull" sentence, do you actually mean "push" rather than "pull"? "push" makes sense to me.

JetBrains url in Sponsors has a typo

The URL for the JetBrains sponsor is:
https://www.jetbtrains.com/
when it should have been:
https://www.jetbrains.com/

Weirdly enough there's already a website at the wrong URL and that could be misleading.

Zebra Stripes Example is broken

Page:
https://codemirror.net/6/examples/zebra/

Console error:

codemirror.js:530 Uncaught DOMException: Failed to execute 'insertRule' on 'CSSStyleSheet': Failed to parse the rule '.ͼ1 zebraStripe@light {background-color: #f4fafa;}'.
at StyleSet.mount (https://codemirror.net/6/codemirror.js:530:139)
at Function.mount (https://codemirror.net/6/codemirror.js:529:60)
at EditorView.mountStyles (https://codemirror.net/6/codemirror.js:1123:784)
at new EditorView (https://codemirror.net/6/codemirror.js:1093:803)
at https://codemirror.net/6/examples/zebra/zebra.js:7:218
at https://codemirror.net/6/examples/zebra/zebra.js:7:426

Styling bug leads to non-visible text

The feature

In your collaborative editor example, <input> elements are transparent, allowing the bar's purple background to show through, and white text is used as accent.

image

 

 

 

The bug

The relevant <option>s are unstyled, and white backgrounded by default, meaning only the currently selected one is practically visible.

image

image

 

 

 

Proposed fix

I will deliver a PR which adds a rule in the site inline style block, to style the options to match the theme rather than to keep the transparent backgrounds.

image

Examples

These need to be written, at the very least:

  • Creating a language mode
  • Dynamic configuration
  • Collaborative editing
  • Internationalization
  • Decorating
  • Tooltip/panel use
  • Autocompletion
  • Linting
  • Custom autocompletion
  • Creating/using highlighters
  • Writing a theme
  • Nested parsing (including a template-style language)

Theme docs need tweaking for $ syntax and extensions via state not view

The sample theme in the Styles and Themes section of the docs doesn't work for me with @codemirror/view v0.17.7. So far as I can tell it needs to pass the extension via state not directly to the view and be updated for the $ prefix.

I got it working with this code:

let view = new EditorView({
  state: EditorState.create({
    extensions: EditorView.theme({
      $content: { color: "orange" }
    }), 
  })
);

Some of the surrounding text might need tweaking to explain the $ prefix too.

Thanks for the really helpful overview docs 😄

Docs for CodeMirror 5

Are the docs for CodeMirror 5 still hosted somewhere? 6.0 is only four hours old so I haven’t yet had time to upgrade. :')

non-editable javascript editor at top of home page

At the moment, https://codemirror.net/ has this text near the top:

This is a CodeMirror field, configured for editing JavaScript code.

Is that text supposed to be in or under an editable field? On my platform there's nothing editable there. It's being rendered as:

<div id=editor></div>

<p>This is a CodeMirror field, configured for editing JavaScript code.</p>

Chrome 101.0.4951.54 on Linux

Split View documentation - Typescript: Expected 0 type arguments, but got 1.

Typescript error:
TS2558: Expected 0 type arguments, but got 1.

let syncAnnotation = Annotation.define<boolean>()

removing <boolean> worked,
let syncAnnotation = Annotation.define()

I'm not sure how to put in a PR for the documentation, or if this is just specific to a certain tsconfig I'm running and might help someone in the future.

minor: no favicon

The following may be sufficient.

<link rel="icon" href="/style/logo.svg">

update SEO docs so codemirror 5 is less prevalent in google searches

Steps to reproduce:

  1. google 'CodeMirror docs'
  2. press first link

Expected behavior:

Arrive at most recent up-to-date documentation

Resulted behavior:

Arrive at https://codemirror.net/5/doc/manual.html , the documentation pointing towards the previous version.

Comments:

It is unclear from reading the google search result to which CodeMirror the link is pointing to. As it is unclear from the docs which parts of the API are deprecated and which parts aren't, I have no valuable information to find on this link. So it is a bit a 50/50 chance everytime I google for the CodeMirror-docs.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.