Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8707351
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T03:51:02+00:00 2026-06-13T03:51:02+00:00

I decided to use NicEdit on a project, because is lightweight. So, now I

  • 0

I decided to use NicEdit on a project, because is lightweight.

So, now I have a variable number of instances in my page, loaded on click and removed on editor blur.

I need to know how to unbind events from this component. I tried to unbind it manually, but I didn’t understand where they are linked!

$('.container').bind('click', function(){
    var _form = $(this).parentsUntil('form').parent();
    var textarea = _form.find('textarea.edit');
    var ta_id = textarea.attr('id');
    var ed = new nicEditor(niceditOptions).panelInstance(ta_id);

    // Show Preview and update textarea and so on
    ed.addEvent('blur', function() {
        var _ed = nicEditors.findEditor(ta_id);
        var ev_type, evt, events = this.eventList;

        for (ev_type in events){
            for (evt in ev_type){
                if (this.removeEventListener){
                    this.removeEventListener(ev_type, events[ev_type][evt]);
                }
                else {
                    this.detachEvent('on' + ev_type, events[ev_type][evt]);
                }
            }
        }
        this.removeInstance(ta_id);
    });
            
});
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T03:51:03+00:00Added an answer on June 13, 2026 at 3:51 am

    There are potentially other ways of going about your solution, but in this scenario I prefer to use one version of a nicEditor panel and bind all of my WYSIWYG instances. The reason for this is that I think its slightly tidier. I will assume that you know how to bind one editor to multiple editable instances.

    On load my HTML would probably look something like this:

    <div id="instance1">text</div>
    ...
    <div id="instance2">text</div>
    ...
    <div id="myNicPanel" style="display:none;position:relative;"></div>
    

    So, once the page has completed it’s load cycle, i should have two editable areas and a hidden editor. I would then use the following jQuery to reposition and show the editor when an instance is selected for editing:

            $('#instance1 , #instance2').click(function () {
             //Reposition the editor to just above the selected instance
                $('#myNicPanel').css({
                    top: $(this).position().top,
                    left: $(this).position().left,
                    display: 'block',
                    width: $(this).width() - 2 //manual adjustment,
                    position: 'absolute'
                });
             //Make the width of the editor equal to that of the instance
                $('#myNicPanel').css({
                    top: $(this).position().top - $('#myNicPanel').height()
                });
            });
    

    You would of course already have initiated your editor and instances prior to this, and if you also want to have the editor hide again on blur, you could attach your hide() function to one of the nicEditor events.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have decided to use IoC principles on a bigger project. However, i would
I have decided to use a common viewModel for a number of my screens.
I have decided to use Netbeans and Mercurial for my latest project (after no
I've decided to use SQLite for my personal development project, because it just sprung
I'm just starting a project and decided to use Spring with Appengine. I'm now
I decided to use storyboards in a project I have been doing. When the
I have decided to use python 3 in a project. When I tried easy_install
I have decided to use ASP.NET MVC for a website project and want to
I decided to use Regex, now I have two problems :) Given the input
If I decided to use a library project in mine I still have to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.