I know this isn't currently a featured option within the interface, but could you direct me to how to modify the code so that the default link type in CKeditor stays URL rather than drupal? I tend to post external URLs far more often than internal ones, so I'd like to keep the old default if possible when using this module.

CommentFileSizeAuthor
#13 link.png75.11 KBaitala

Comments

anrikun’s picture

Title: How to change the default link type? » Allow to configure which link type is selected by default
Category: support » feature

In plugins/link/plugin.js, try to remove line 70:

        content['default'] = 'drupal';
tarzadon’s picture

I tried this and it didn't work for me.

I would also like URL to be the default. I thought that i had lost "Browse Server", but this only shows when URL is selected.

mherchel’s picture

I can confirm that commenting out that line does not work. I also tried the following which did not work:
content['default'] = 'URL';
I did clear Drupal's cache, disabled javascript optimization, and cleared the browser's cache to be sure my browser was downloading the latest version of plugin.js

I also would like URL to be the default. Thanks and Happy New Year!

laogui’s picture

I remove line 70 and it didn't work.

nilsja’s picture

did anybody figure this out?

anrikun’s picture

Version: 6.x-1.2 » 6.x-2.x-dev

This is now present in the new 6.x-2.x branch.
Please read #1107954: New 6.x-2.x and 7.x-2.x: To developers who want to support CKEditor Link.

anrikun’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nilsja’s picture

@anrikun, where is it present? /admin/settings/ckeditor_link does not work for me with the current 6.x-2.x-dev

anrikun’s picture

Admin page is at: admin/settings/ckeditor_link
It's under:
- Administer
--- Site configuration
------ CKEditor Link

If the link does not show up for you, you should try to clear your menu cache by visiting the Modules page (admin/build/modules).

aitala’s picture

Issue summary: View changes

So how would I force 'URL' to be the default using the API?

I have no clue...

E

anrikun’s picture

@aitala:
If you use D7, go to admin/config/content/ckeditor_link and uncheck Selected by default.

aitala’s picture

StatusFileSize
new75.11 KB

I meant for D6.x-2.x-dev... sorry for the confusion.

If I uncheck 'Selected by Default', no link type - Internal Link nor URL - is set as default. See image.

I would like URL to remain the default.

I was assuming that the new API would allow me to set the default to URL, but I do not see how.

E

anrikun’s picture

Are you sure you use the latest 6.x-2.x-dev?

aitala’s picture

Yes, I DL'd it last night and got the same result. Even deleted its entire directory, re-downloaded it, cleared cache and got no default option chosen.

Eric

anrikun’s picture

I can't reproduce the bug.
What versions of CKEditor (the Drupal module) and CKEditor (the JS library) do you use?

aitala’s picture

Hi,

I am using -

Wysiwyg 6.x-2.4+47-dev (2014-Jun-05)

with

CKEditor 4.4.6.08188c4

I don't use the standalone CKEditor module.

E

aitala’s picture

Quick note -

On a D7 site, where I am having no trouble with the CKEditor Link defaults, I am using -

Wysiwyg 7.x-2.2+54-dev (2014-Oct-18)

with

CKEditor 4.4.7.3a35b3d

E