Using the UIKit HTML editor in frontend

  • Hello everybody,


    I would like to use the UIKit HTML-editor in the frontend... It should be working with Markdown and it should be splitted to edit and preview window.


    Unfortunately, I can not use it correctly...


    This is what I did:



    Well... This is my result:



  • I just saw that we had this topic a year ago: Using editor in frontend


    Unfortunately there was no solution... I think the problem is that


    Code
    1. this.$pagekit.editor

    (https://github.com/pagekit/pag…onents/editor-html.js#L21)


    is empty in the frontend because it's not added:


    (https://github.com/pagekit/pag…s/theme/index.php#L29-L31)

    So if I add the editor to the view's data like this:


    Code
    1. 'view.layout' => function ($event, $view) use ($app) {
    2. $view->data('$pagekit', [
    3. 'editor' => 'html',
    4. ]);
    5. }


    The v-editor is shown instead of the pure textarea - but the styling is not working.