-2

I'm working on a plugin to add external navigation in a parent website with an embedded iframe where Etherpad is running. The navigation to a certain point works fine via vanilla JavaScript and window.postmessage, but I have no idea how to get new navigation points into the pad.

I'm using the Etherpad API for Java to prepopulate the pad with the existing navigationpoints/anchors, which works fine.

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
Zumpfiii
  • 56
  • 1
  • 5

1 Answers1

1

After reviewing 24 other plugins, I finally found those lines which solved my problem

context.ace.callWithAce((ace) => {
    // New Line gets created
    ace.ace_doReturnKey();
}, 'addNewLine', true);

It's a call via ace and the context but could be done in every hook with context and ace access

Zumpfiii
  • 56
  • 1
  • 5