Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added ability for a callback on update of Editor content - as well as… #57

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -1005,7 +1005,7 @@ You should have received a copy of the GNU General Public License along with thi
'togglescreen':true
},options);

var containerDiv = $("<div/>",{ class : "row-fluid Editor-container" });
var containerDiv = $("<div contentEditable />",{ class : "row-fluid Editor-container", tabindex : "0" });
var $this = $(this).hide();
$this.after(containerDiv);

Expand All @@ -1031,9 +1031,17 @@ You should have received a copy of the GNU General Public License along with thi
$(editor_Content).data("statusBar").html('<div class="label">'+'Words : '+wordCount+'</div>');
$(editor_Content).data("statusBar").append('<div class="label">'+'Characters : '+charCount+'</div>');
});
}


}

containerDiv.on("blur", function (event) {
console.log(typeof editorObj, editorObj);
$this.val(methods.getText.apply(editor_Content));
if (typeof options.changeCallback !== 'undefined') options.changeCallback($this.val());
$(editorObj).data("editor").focus();

});


for(var item in menuItems){
if(!settings[item] ){ //if the display is not set to true for the button in the settings.
if(settings[item] in menuGroups){
Expand Down