Mariette
  •  Mariette
  • 78.4% (Friendly)
  • YAF Commander Topic Starter
2016-08-31T13:34:07Z
If I use the YAF CKEditor and past a URL by using CTRL-V there is no 'nofollow'. When I paste in BBCode and save the post there is (target="_blank" rel="nofollow") added to the link. How do I get to work also when I paste a link with CTRL-V?

This is in YAF for DNN version 2.2.3 and DNN 8.0.4
MJK
Sponsor
Mariette
  •  Mariette
  • 78.4% (Friendly)
  • YAF Commander Topic Starter
2016-08-31T14:06:13Z
I have found a little solution that helps me a bit. In config I add:
CKEDITOR.on( 'dialogDefinition', function( ev )
{
// Take the dialog name and its definition from the event data.
var dialogName = ev.data.name;
var dialogDefinition = ev.data.definition;

// Check if the definition is from the dialog window you are interested in (the "Link" dialog window).
if ( dialogName == 'link' )
{
// Get a reference to the "Link Advanced" tab.
var advTab = dialogDefinition.getContents( 'advanced' );
var relField = advTab.get( 'advRel' );
relField['default'] = 'nofollow';
}
});


But that does not work on pasting the URL. It only sets 'nofollow' in the dialog
MJK
tha_watcha
2016-09-04T15:42:05Z
You need the autolink plugin

http://ckeditor.com/addon/autolink 

that converts an url to a link if you paste the url
UserPostedImage

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved