Wysiwyg-editor: How to set default on checkbox "Open in new tab" as checked?

Created on 23 Sep 2016  路  5Comments  路  Source: froala/wysiwyg-editor

I would like to set the checkbox "Open in new tab" as automatically checked, unfortunately the only available option regarding the matter (linkAlwaysBlank) doesn't cover this aspect. Is there any way to do it?

Most helpful comment

This really should be an option.

Your code doesn't really help when pasting in a link.

All 5 comments

There is no such feature built-in the editor for that. What you could do is to register to the popups.show event and mark it that way the popup is shown. Here is some code that

  $('selector').on('froalaEditor.initialized', function (e, editor) {
    editor.popups.onShow('link.insert', function () {
      var $popup = editor.popups.get('link.insert');
      console.log ($popup);
      $popup.find('input[type="checkbox"]').prop('checked', true);
    });
  }).froalaEditor();

This really should be an option.

Your code doesn't really help when pasting in a link.

Agree that this should be an option

I also agree this should be an option.

Dunno why this is closed, I would also need this feature.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

isubasti picture isubasti  路  4Comments

cristianst picture cristianst  路  4Comments

archonic picture archonic  路  4Comments

homoky picture homoky  路  3Comments

kikeso77 picture kikeso77  路  3Comments