tinymce / tinymce-react

Offical TinyMCE React component
MIT License
959 stars 156 forks source link

Link Settings Not Working #395

Closed bmyers427 closed 1 year ago

bmyers427 commented 1 year ago

What is the current behavior?

Adding init settings for link behavior do not seem to change anything. No errors are being thrown either. Particularly, default_link_target and link_assume_external_targets don't work. Here is my editor config. I've noticed other settings that don't seem to do anything either.

        <Editor
          apiKey="<api-key>"
          value={changedContent}
          onEditorChange={(value) => {
            setChangedContent(value);
            setDirty(true);
          }}
          inline={true}
          plugins={[
            "autolink",
            "link",
            "lists",
            "media",
            "table",
            "quickbars",
            "help",
          ]}
          init={{
            paste_as_text: true,
            height: 350,
            menubar: false,
            toolbar: false,
            resize: false,
            quickbars_insert_toolbar: false,
            quickbars_selection_toolbar:
              "bold italic underline | formatselect bullist numlist | quicklink quicktable",
            contextmenu: "undo redo",
            powerpaste_word_import: "clean",
            powerpaste_html_import: "clean",
            default_link_target: "_blank",
          }}
        />

What is the expected behavior?

Adding default_link_target: "_blank" will make any user generated links have the prop target="_blank" added to them.

exalate-issue-sync[bot] commented 1 year ago

Ref: INT-3034

tiny-james commented 1 year ago

Version 4 of the integration loads TinyMCE 6 by default (unless you specify cloudChannel='5' to get TinyMCE 5).

In TinyMCE 6 default_link_target was renamed to link_default_target: https://www.tiny.cloud/docs/tinymce/6/migration-from-5x/#things-we-renamed

link_assume_external_targets is still named the same.

What about link_assume_external_targets is not functioning correctly?

tiny-james commented 1 year ago

Since I haven't heard anything I'm closing this on the assumption that it was the upgrade from TinyMCE 5 to 6 that caused the problem.