A
A
alexandrnevajno12018-02-17 09:41:43
CKEditor
alexandrnevajno1, 2018-02-17 09:41:43

Ckeditor plugin Link - where do lines come from - parameters for functions?

Hello! Setting up ckeditor. More precisely, its plugin is Link.
I want to remove unnecessary fields from the add link dialog. I removed everything except the text and the link itself thanks to this code (I found it on the Internet):

CKEDITOR.on('dialogDefinition', function (ev) {
  var dialogName = ev.data.name;
  var dialogDefinition = ev.data.definition;

  if (dialogName == 'link') {
    dialogDefinition.removeContents('target');
    dialogDefinition.removeContents('advanced');

    var infoTab = dialogDefinition.getContents('info');

    infoTab.remove('linkType');
    infoTab.remove('protocol');
  }
});

Question. Where did you get linkType, protocol from? Here I want to remove some other field. Where can I get the parameter for the remove function (string)?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
mashkov, 2018-02-22
@alexandrnevajno1

https://docs.ckeditor.com/ckeditor4/latest/guide/d... - the answer to the question is described here.
You can download the Customize version here: https://ckeditor.com/ckeditor-4/download/ , select the "Developer Tool" plugin.
When you open the editor, a tooltip with the name of the bookmark and field will pop up next to each field.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question