This editor looks very slim smooth and usable. Is there any integration planned with IMCE? This would be a killer argument for me to use this editor.
cheers,
m

Comments

ufku’s picture

The online version(http://js.nicedit.com/nicEdit.js) and the latest version need different methods for IMCE integration.

If you didn't download anything, include this script in your pages for IMCE integration. (Note: This could be depraceted if they update http://js.nicedit.com/nicEdit.js. Then, use the other method)

<script type="text/javascript">
$(document).ready(function() {

if (typeof nicEditors == 'undefined') return;

nicEditorImageButton.prototype.oldAddPane = nicEditorImageButton.prototype.addPane;
nicEditorImageButton.prototype.addPane = function() {
  this.oldAddPane();
  nicImceIntegrate('nicImageURL');
};

nicEditorLinkButton.prototype.oldAddPane = nicEditorLinkButton.prototype.addPane;
nicEditorLinkButton.prototype.addPane = function() {
  this.oldAddPane();
  nicImceIntegrate('nicLinkURL');
};

nicImceIntegrate = function(field) {
  $('<a href="#">Browse</a>').click(function() {
    window.open(Drupal.settings.basePath +'?q=imce&app=nicEdit|url@'+ field, '', 'width=760,height=560,resizable=1');
    return false;
  }).insertAfter('#'+ field);
};

});
</script>

If you downloaded the latest version(0.9.0b), include this script in your pages for IMCE integration.

<script type="text/javascript">
$(document).ready(function() {

if (typeof nicEditors == 'undefined') return;

nicImageButton.prototype.oldAddPane = nicImageButton.prototype.addPane;
nicImageButton.prototype.addPane = function() {
  this.oldAddPane();
  nicImceIntegrate('src');
};

nicLinkButton.prototype.oldAddPane = nicLinkButton.prototype.addPane;
nicLinkButton.prototype.addPane = function() {
  this.oldAddPane();
  nicImceIntegrate('href');
};

nicImceIntegrate = function(field) {
  $('<a href="#">Browse</a>').click(function() {
    window.open(Drupal.settings.basePath +'?q=imce&app=nicEdit|url@'+ field, '', 'width=760,height=560,resizable=1');
    return false;
  }).insertAfter('#'+ field);
};

});
</script>
nitram079’s picture

beautiful, thanks a bunch!

avolve’s picture

Would this script be added to page.tpl.php or could a separate js file be created that would be called on for node/add pages??

[hopefully not a silly question]

douggreen’s picture

I'm not doing much to maintain nicEdit right now, but if you turn this into a patch, and two or more people confirm it works, I'll commit it with some minimal testing on my part.

NickLitten’s picture

I use Nicedit on some sites with simple text edit and FCKEDITOR/IMCE on all other that need graphics to be easily added.

If IMCE gets in NICEDIT this would make it a killer app!!!

pretty please?

mdgrech’s picture

could someone please tell me exactly where I put this script

douggreen’s picture

Status: Active » Closed (won't fix)