Jump to content

Links with attributes or class in FCKEditor?


joe_ma
 Share

Recommended Posts

Hello

I should like to be able to add a class and/or a rel attribute to the links created with CKEditor. Out of the box it creates only links like this:

<a href="somelink">Some link text</a>

What I like users being able to do is

<a href="somelink" class="my_class">Some link text</a>

or

<a href="somelink" rel="internal">Some link text</a>

How can I achieve this?

Link to comment
Share on other sites

What is google?? ;)

But I don't think that answers my question.

In the settings for the textarea field I checked (as is recommended) the extra plugin pwlink. So now, if you klick the link button in CKEditor you get the pw-popup with the only possibility to set the target, but no class or rel attribute.

Though at the top of the js-file for this plugin there is this definition:

(function() {

	CKEDITOR.plugins.add('pwlink', {
		
		requires: 'dialog,fakeobjects',
		
		init: function(editor) {
			
			var allowed = 'a[!href,target,name,title,rel]';
			var required = 'a[href]';

So what I would like to have is that the pw-popup also shows fields for «title» and «rel» where I can set attributes for the anchor.

Link to comment
Share on other sites

Hey, I see what you mean, but unfortunately that's not my job site.

Maybe it is possible to manipulate those js and/or related css files and store them under site/modules/InputfieldCKEditor/. But I don't really know, - that's not my job site.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...