Editor mounting point

Editor mounting point

SavinienSavinien Posts: 12Questions: 6Answers: 1

Hello there,

is there a way to choose the mounting point of Editor? I want to include it in a react application. Since react is very particular with its control over the dom, the editor should mount in a place I can declare as being not under react's influence.

Thank you very much

Rüdiger

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin
    Answer ✓

    Do you mean where Editor inserts its elements into the document? This is something that is under control of the display controller in Editor.

    The default 'lightbox' display controller uses:

            $('body')
                .append( self._dom.background )
                .append( self._dom.wrapper );
    

    so currently there isn't an option to configure that I'm afraid, although that code could be altered to insert it wherever you need, or a new display controller created.

    Allan

  • SavinienSavinien Posts: 12Questions: 6Answers: 1

    Yes, that is what I meant.

    If it appends to the body it should in itself be out of the scope of the react component, which also is only an item inside body. So it should be no problem at all.

    Still it might be a good idea to be able to have a bit more control over that for other uses. So an optional "target" option might be an interesting future addition.

    Thanks
    Rüdiger

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin

    Thanks for the suggestion - it does sound like it could be useful.

    Allan

This discussion has been closed.