Sign in

Allow the scripts and configurations in tinymce editor

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #675
    gpsbluesgpsblues

    Hi,

    I follow these instructions without results https://getpublii.com/dev/how-to-add-custom-config-or-js-for-post-editor/

    1. Add “extensions” section in config.json at the end of file
      `{`
      `  “name”: “QF”,`
      `  …`
      `  “extensions”: {`
      `    “postEditorConfigOverride”: true,`
      `    “postEditorCustomScript”: true`
      `  }`
      `}`
    2. Create tinymce.override.json file in folder_override template
    3. Add options in tinymce.override.json file
      `{`
      `  “toolbar2”: “”,`
      `  “valid_elements”: “*[*]”`
      `}`

    Toolbar 2 is not removed.
    All scripts are converted in
    ``
    or
    ``

    Thank you

    #728
    Tomasz DziudaTomasz Dziuda
    Moderator

    Hi,

    To disable toolbar you have to set it to false instead of empty string.

    Regarding script conversion – it is an internal TinyMCE mechanism which cannot be overrided even with valid_elements option.

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #731
    gpsbluesgpsblues

    Hi Tomasz ,

    thank you very much.

    Alternatively I can use an external js script:

    ``

    or, custom HTML element.

    #996
    anselmystanselmyst

    Hi

    I tried the same process, and the toolbar2 in post editor is not removed.
    I use Publii on linux, do I have to refresh something ?

    in Publii/testsite/input/themes/simple/config.json
    juste before “customElements”, I added :

    `”extensions”: {`
    `”postEditorConfigOverride”: true,`
    `”postEditorCustomScript”: true`
    `},`

    In same folder
    I created tinymce.override.json, I added only :

    `{`
    `”toolbar2″: “false”,`
    `”extended_valid_elements”: “*[*]”`
    `}`

     

    #1000
    gpsbluesgpsblues

    Hi @anselmyst

    try

    `{`
    `”toolbar2″: false
    }`

    It works!

    #1001
    anselmystanselmyst

    Hi

    It doesn’t work 🙁

    Do you agree that it’s supposed to remove the black toolbar ?

    Capture-d’écran-de-2019-12-11-19-29-39

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.