What's new? | Help | Directory | Sign in
Google
  
  
  
  
    
Search
for
Updated Mar 23, 2007 by Tiago.Pocinho
Labels: Featured
News  
Latest news about this project.

March 23rd, 2006 - Version 1.0 RC1 released

The first version of the wp-page-linker plugin for Wordpress was made public. Feel free to download it, test it, and improve it :).


Comment by ulrich.roissard, Sep 26, 2007
Hi,

I have changed a bit the 'updateAction' function in order the resulting link text be the selected text. I don't know how to join this project, so here is the source code.

//Sends the selected page to the editor as a link function updateAction() {

var formObj = document.forms0?; var page = getCheckedValue(formObj.elements['page']); if(page != ""){
var href = pagespage?0?; var title = pagespage?1?;
tinyMCEPopup.restoreSelection();

if (tinyMCE.selectedInstance.selection.getSelectedText().length <= 0) {
myValue = "<a href='"+href+"' title='" + title + "'>" + title + "</a>"; tinyMCE.execCommand("mceInsertContent", true, myValue);
} else {
var target = ""; var style_class = ""; var dummy; tinyMCE.themes['advanced'].insertLink(href, target, title, dummy, style_class);
}
tinyMCEPopup.close();
}else{
alert("Please select a page.");
}

}

Comment by ulrich.roissard, Sep 26, 2007
Hi,

I have changed a bit the 'updateAction' function in order the resulting link text be the selected text. I don't know how to join this project, so here is the source code.

//Sends the selected page to the editor as a link function updateAction() {

var formObj = document.forms0?; var page = getCheckedValue(formObj.elements['page']); if(page != ""){
var href = pagespage?0?; var title = pagespage?1?;
tinyMCEPopup.restoreSelection();

if (tinyMCE.selectedInstance.selection.getSelectedText().length <= 0) {
myValue = "<a href='"+href+"' title='" + title + "'>" + title + "</a>"; tinyMCE.execCommand("mceInsertContent", true, myValue);
} else {
var target = ""; var style_class = ""; var dummy; tinyMCE.themes['advanced'].insertLink(href, target, title, dummy, style_class);
}
tinyMCEPopup.close();
}else{
alert("Please select a page.");
}

}


Sign in to add a comment