Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Application is getting stuck when changing numbered or bulleted list.

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 252
    Comment on it

    Hello all,

    While working with HTML Editor I faced an issues that, Application was getting stuck when changing elements with contenteditable="false" to numbered or bulleted list.

    To change a multiline into numbered or bulleted list, we generally use document.execCommand('indent'); method and to remove the numbered or bulleted list we use document.execCommand('outdent');, but if within those multiline text, we have any <label> tag that has its contenteditable property set to false, than these method does not work properly.

    To Solve this issues we have this block of Code :

    document.execCommand('strikethrough');
    this.$editor.find('strike').each($.proxy(function (i, s) {
        var $el = $(s);
        if (tag == "strong") this.so.removeBoldTagFromDiv($el);
             if ($(s).closest('label').length > 0) {
                    $(s).find('label').prop('contenteditable ', 'true');
              }
    }
    document.execCommand('indent'); 
    
    this.$editor.find('strike').each($.proxy(function (i, s) {
        var $el = $(s);
         if ($(s).closest('label').length > 0) {
             $(s).find('label').unwrap();
         }
    }
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: