twinejs icon indicating copy to clipboard operation
twinejs copied to clipboard

Passage autocomplete should really be on the story format side

Open klembot opened this issue 10 years ago • 2 comments
trafficstars

Originally reported by: Leon Arnott (Bitbucket: L, GitHub: Unknown)


The story formats have specific idiosyncratic markup structures that would benefit from autocomplete, so it would be better if all autocomplete prompts were implemented by the story format alongside its syntax highlighter.

There is a means (albeit reliant on an aforementioned necessary hack) for the story format CM code to access and modify the CodeMirror instance (see here) to add such options as prefixTrigger to it. (Although, this means that when switching formats, CM's options would have to be reset to defaults prior to the format's new options being applied.)


  • Bitbucket: https://bitbucket.org/klembot/twinejs/issue/134

klembot avatar Apr 21 '15 06:04 klembot

Original comment by Anton Zhuchkov (Bitbucket: fireton, GitHub: fireton):


YES! Link detection really needed be don on the story format side. Even now some links is not detected if you using the SugarCube story format. Also I was thinking about my own story format and I don't want be obliged to stick to [[]] link tag.

klembot avatar Aug 06 '15 04:08 klembot

Original comment by Chris Klimas (Bitbucket: klembot, GitHub: klembot):


My take on this is similar to what I think we should do for link detection, i.e. provide some basic behavior and then allow story formats to override it. I am considering writing a very bare bones highlighter too... maybe. We really just need a spec for this and then let you guys go to town.

klembot avatar Apr 22 '15 00:04 klembot