Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Javascript with <context>editor</context> not working on "create page".

Dirk Brutscher
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 18, 2018

Hi,

I wrote a editor plugin for out Confluence 5.8.15 production envionment, which now encounters a problem:

The Javascript only works if a page is edited but not if a page is created. I tried context  <context>fullpage-editor</context> and <context>editor</context>, both have the same issue.


    AJS.toInit(function(){
        
        AJS.Editor.Adapter.addTinyMcePluginInit(function(settings) {

            settings.paste_preprocess = function(plugin, args) {
...

1 answer

0 votes
huvian
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 12, 2018

Hi @Dirk Brutscher, you might need to initialize your plugin with

AJS.Rte.BootstrapManager.addTinyMcePluginInit

instead.

 

However, if you want to be forward compatible and are developing for a later version, this tutorial might help you out.

https://developer.atlassian.com/server/confluence/enabling-tinymce-plugins

Dirk Brutscher
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 12, 2018

Hi,

I always checked the AJS.Rte... version, same problem.

But I think, I found a solution for my problem: https://developer.atlassian.com/server/confluence/extending-autoconvert/

Dirk Brutscher
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 16, 2018

Hmmm, "https://developer.atlassian.com/server/confluence/enabling-tinymce-plugins" works in our 5.x production environment but does not longer work in the Confluence 6.10.0 :-(

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events