overlay - How to work in Atom Editor's view directly -


what i'm trying bizarre - want add lines in views don't belong sourcecode. idea use on package allow "layers" - like, example, typing information or diff info.

what i'm trying image below: notice between line 45 , 46, there gap not selectable user, nor editable - it's additional info put there.

this example created in gimp

so far, tried create marker overlay, marker "floats" on text, overlaps what's written (and there goes notion of "layers"). i've tried edit dom directly, when scroll, if add lines, invalidated or scroll incorrectly (and need update cursor, gutter information , more things)

is possible? there workaround?

this older, understand block decorations part of atom 1.6 want.

as described in blog post, "a block decoration special kind of decoration allows insert dom node before or after line, , have follow line buffer changes. can see in action running snippet below in devtools":

var element = document.createelement('div') element.textcontent = 'block decorations!' var editor = atom.workspace.getactivetexteditor() var marker = editor.markscreenposition([0, 0]) editor.decoratemarker(marker, {type: 'block', position: 'before', item: element}) 

please note of works in atom 1.6 beta release.


Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -