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.

Reply via email to