Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Julien Kulker 75 posts 427 karma points c-trib
    May 16, 2022 @ 10:32
    Julien Kulker
    0

    TinyMce Init with javascript functions

    Hi All,

    Recently i am playing with Tinymce in Umbraco 9. I am trying to install a custom plugin that is called "Lance" I am struggling to add some javascript functions to the init method for Tinymce. Because we now have to do it in the appsettings.json

    So i have a function like below:

    setup: function(editor) {
                        editorStates[id] = editorStates[id] || new EditorState(editor);
                        editor.on("lance::init", function (event) {
                            var lance = event.lance,
                                ann = lance.getAnnotations();
                            createUI(ann);
                            if (focus) {
                                setTimeout(function() {
                                    onEditorSelected(id);
                                }, 1);
                            }
                            $(".lance-version").html(event.lance.version);
                            console.log(event);
                        });
                    }
    

    How should we set it correctly in Umbraco 9

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies