Sign in

Allow the scripts and configurations in tinymce editor

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #675
    gpsblues

    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
    <script>// <![CDATA[ ... // ]]></script>
    or
    <!--?php ... ;/?-->

    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
    gpsblues

    Hi Tomasz ,

    thank you very much.

    Alternatively I can use an external js script:

    <script src="path/file.js"></script>

    or, custom HTML element.

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