joe_ma Posted November 21, 2014 Share Posted November 21, 2014 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 More sharing options...
horst Posted November 21, 2014 Share Posted November 21, 2014 If it is related to that what was asked here a few days ago, we may find it via google Look to the post from Fokke! 1 Link to comment Share on other sites More sharing options...
joe_ma Posted November 22, 2014 Author Share Posted November 22, 2014 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 More sharing options...
horst Posted November 22, 2014 Share Posted November 22, 2014 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now