Link Editor to a class name

424 views
Skip to first unread message

Djalel

unread,
Jun 2, 2014, 9:15:00 AM6/2/14
to ace-d...@googlegroups.com
Hi Folks,

I'd like to add ACE to the IPython Notebook, is it possible to link an editor to a particular class, instead of a div ID? Say for example
var editor = ace.edit(".editor_class");

Thanks,
dj.

Harutyun Amirjanyan

unread,
Jun 2, 2014, 9:20:58 AM6/2/14
to ace-d...@googlegroups.com
Hi

> I'd like to add ACE to the IPython Notebook,

cool!

> is it possible to link an editor to a particular class, instead of a div ID

you can pass element instead of id

elements = document.querySelectorAll(".editor_class")
for (var i = 0; i < elements.length; i++) {
ace.edit(elements[i])
}

Kyle Sowards

unread,
Jun 9, 2014, 2:28:28 PM6/9/14
to ace-d...@googlegroups.com
When I try to pass the elements this way, the browser just hangs and eventually tells me to just kill the page.
Is there something else that needs to be included in order for this method to not kill the browser?

Harutyun Amirjanyan

unread,
Jun 9, 2014, 2:41:34 PM6/9/14
to ace-d...@googlegroups.com
That must be a bug, but i can't reproduce it. Could you give me a link
to a page where this happens?
Reply all
Reply to author
Forward
0 new messages