Thank you both.

I had meant to ask about CodeMirror 6 but forgot so really glad you
mentioned it. Given time constraints, the first version of the tutorials
will likely be with CodeMirror5 - it is very minor what I am going:
 - this is the code you should add,
- here is a demo of it being "typed" into the code command (what I need the
CodeMirror instance for),
- now you try.

but 6 will break it with how they change handling lines so later I will
just have to make some changes. But changing of a 'demo' function shouldn't
be too bad, between CodeMirror 5 and 6 (famous last words)

Thank you,
Doug


On Wed, Feb 15, 2023 at 5:10 PM John Chen <yuehanchen2...@u.northwestern.edu>
wrote:

> I would caution against working too much over the current CodeMirror 5
> editor in NLW - we are now working on a CM6 version of the editor, with a
> much more open API for external calls incl. features that allow you to
> examine the code in detail.
>
> The CM6 WIP is also open-sourced as a standalone repository so you might
> want to look at it as well.
>
> On Wed, Feb 15, 2023 at 10:53 AM jeremy...@northwestern.edu <
> jeremy.ba...@northwestern.edu> wrote:
>
>> One quick followup question Jeremy -how did you all "gray" out areas of
>> CodeMirror on the Beginner's Interactive NetLogo Dictionary. An example of
>> what I mean on the or primative -
>> https://ccl.northwestern.edu/netlogo/bind/primitive/or.html. I could see
>> that being quite helpful for some of what I am doing.
>>
>> So the code for that is in `primitive.html`
>> <https://github.com/NetLogo/beginners-interactive-netlogo-dictionary/blob/master/app/templates/primitive.html#L251-L278>
>> and it's pretty basic - it searches for matching non-comment lines that
>> contain the primitive being described and marks anything else as disabled
>> with a CSS class.   It then adds a popup alert
>> <https://github.com/NetLogo/beginners-interactive-netlogo-dictionary/blob/master/app/templates/primitive.html#L221-L231>
>> when people modify those disabled lines.  That popup is the actual
>> "disabling" mechanism, blocking the edits.
>>
>> I should also point out that we've got big changes coming to the code
>> editor sometime soon, including upgrading to CodeMirror 6, which will
>> unfortunately likely break the work you're doing.  But of course you can
>> always still with an older version of the codebase for your work.
>>
>> I hope you're able to share what you build when you're done.  I'd love to
>> see it.
>>
>> -Jeremy
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "netlogo-devel" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to netlogo-devel+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/netlogo-devel/84f223ed-a54a-4c42-9096-9b86f70cd2den%40googlegroups.com
>> <https://groups.google.com/d/msgid/netlogo-devel/84f223ed-a54a-4c42-9096-9b86f70cd2den%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "netlogo-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to netlogo-devel+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/netlogo-devel/CAJ_UcvzkH_wsG%2BnFnm6hur7AcovA1WR8oTDCF5it9OTVb%3D-9bw%40mail.gmail.com
> <https://groups.google.com/d/msgid/netlogo-devel/CAJ_UcvzkH_wsG%2BnFnm6hur7AcovA1WR8oTDCF5it9OTVb%3D-9bw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"netlogo-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to netlogo-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/netlogo-devel/CAP77dmKZzQHodvRWLOuc_%2BzmnRN5iv8Vj8bnfv0a-nfqAiL%2Bxw%40mail.gmail.com.

Reply via email to