TinyMCE API and OJS in Docker

Where to put API key from TinyMCE?

I have OJS installed via docker. When I wanted to create first journal, I see warning:

A valid API key is required to continue using TinyMCE.Please alert the admin to check the current API key. They want to go to their site

In other posts I saw the information, that in installation you use small self-hosted version. In Docker too?

What application are you using?
OJS 3.3.0-4

Docker image: “pkpofficial/ojs:3_3_0-14”

Hi @Adam_Jurkiewicz,

I’ve seen a few others reporting this here and there on the forum and unfortunately I’m not sure about the cause – perhaps try upgrading to a newer release of OJS if it’s possible. However, you shouldn’t need a TinyMCE API key; we are using the free version, which does not require one.

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

I check source html of page, which display this warning. I found in HTML:

,“tinyMceContentCSS”:“https://ojs-33-lts.xxxxxx.pl/plugins/generic/tinymce/styles/content.css”,

But - If I connect to docker, i see plugins directory EMPTY! Maybe this is something…

OK, I found tinyMCE inside Docker:

/var/www/html/lib/pkp/lib/vendor/tinymce/tinymce # ls -la
total 1844
drwxrwxrwx    6 apache   apache        4096 Dec  4 13:23 .
drwxr-xr-x    3 apache   apache        4096 Dec  4 13:23 ..
-rw-r--r--    1 apache   apache          25 Dec  4 13:23 .npmignore
-rw-r--r--    1 apache   apache      195919 Dec  4 13:23 CHANGELOG.md
-rw-r--r--    1 apache   apache        4688 Dec  4 13:23 README.md
-rw-r--r--    1 apache   apache         448 Dec  4 13:23 bower.json
-rw-r--r--    1 apache   apache         829 Dec  4 13:23 composer.json
drwxrwxrwx    3 apache   apache        4096 Dec  4 13:23 icons
-rw-r--r--    1 apache   apache        6596 Dec  4 13:23 jquery.tinymce.js
-rw-r--r--    1 apache   apache        6596 Dec  4 13:23 jquery.tinymce.min.js
-rw-r--r--    1 apache   apache       26441 Dec  4 13:23 license.txt
-rw-r--r--    1 apache   apache         644 Dec  4 13:23 package.json
drwxrwxrwx   46 apache   apache        4096 Dec  4 13:23 plugins
drwxrwxrwx    4 apache   apache        4096 Dec  4 13:23 skins
drwxrwxrwx    4 apache   apache        4096 Dec  4 13:23 themes
-rw-r--r--    1 apache   apache      117255 Dec  4 13:23 tinymce.d.ts
-rw-r--r--    1 apache   apache     1085015 Dec  4 13:23 tinymce.js
-rw-r--r--    1 apache   apache      393177 Dec  4 13:23 tinymce.min.js

But - how to enable it ?

Hi @Fauji_Nurdin,

Is the above post AI generated? Please don’t use AI to generate forum posts; it results in plausible-looking but misleading advice.

@Adam_Jurkiewicz, the suggestions above don’t make sense to me – that configuration file setting doesn’t exist, and neither does the command line tool.

Regards,
Alec Smecher
Public Knowledge Project Team

@asmecher

I am just looking for answer - how to do the OJS working with TinyMCE - I create docker file:


version: "3.6"

networks:
  inside:
    external: false

services:
  db:
    image: mariadb:10.2
    env_file:
      - .env
    container_name: "ojs_db_${COMPOSE_PROJECT_NAME:-demo}"
    environment:
      MYSQL_ROOT_PASSWORD: "${MYSQL_ROOT_PASSWORD:-ojsPwd}"
      MYSQL_DATABASE: "${OJS_DB_NAME:-ojs}"
      MYSQL_USER: "${OJS_DB_USER:-ojs}"
      MYSQL_PASSWORD: "${OJS_DB_PASSWORD:-ojsPwd}"
    volumes:
      - ./volumes/db:/var/lib/mysql
      - ./volumes/dump:/docker-entrypoint-initdb.d
      - ./volumes/logs/db:/var/log/mysql
    networks:
      - inside
    restart: always

  ojs:
    image: "pkpofficial/${OJS_IMAGE:-ojs}:${OJS_VERSION:-latest}"
    env_file:
      - .env
    container_name: "ojs_app_${COMPOSE_PROJECT_NAME:-demo}"
    hostname: "${COMPOSE_PROJECT_NAME:-demo}"
    ports:
      - "8340:80"
      - "8341:443"

    volumes:
      - /etc/localtime:/etc/localtime
      - ./volumes/private:/var/www/files
      - ./volumes/public:/var/www/html/public
      - ./volumes/config/ojs.config.inc.php:/var/www/html/config.inc.php

    networks:
      - inside
    depends_on:
      - db
    restart: always
    

And I cannot edit some fields:

That is my problem.

Very strange…
I have added Journal and tehn in EDIT I can write…
I think I can close this issue.

In case someone gets here in the future: I have checked the problem and, to my knowledge, it does not seem to be related to docker images.

Actually I find it odd even the API key message for tinyMCE as the version that OJS is used is the free version which does not require that.

My only guess it could be related with a platform configuration problem (base_urls) but without more information it is difficult to say for sure.

Let’s close the issue until someone can shed some more light on the alleged problem.