Close aloha editor

138 views Asked by At

I have an iframe which in turn contains the html and aloha libraries for editing.

When i click on the content i get the blue-border with the editor toolbar, which of course hides itself when the mouse is clicked outside of the editable area.

However when i click outside of the iframe itself the editor toolbar still shows.

I thought about adding a dummy element outside of the editable area which I then focus upon, but this doesn't hide it.

Is there an event that I could fire to hide it? I have tried searching the docs and google but could not find anything...

1

There are 1 answers

0
rene.kapusta On BEST ANSWER

here's the part which is called when you deactivate an editable with a click outside of the editable (blur) https://github.com/alohaeditor/Aloha-Editor/blob/release/src/lib/aloha/editable.js#L771

to manually "destroy" an editable you could use .mahalo() -- like you use .aloha()

blur mentioned first is what you probably want to do

hope this helps

/rene