update 2.2 + precedent custom commits
Signed-off-by: bachy <git@g-u-i.net>
This commit is contained in:
+18
-1
@@ -17,7 +17,10 @@ Drupal.wysiwyg.editor.attach.markitup = function(context, params, settings) {
|
||||
/**
|
||||
* Detach a single or all editors.
|
||||
*/
|
||||
Drupal.wysiwyg.editor.detach.markitup = function(context, params) {
|
||||
Drupal.wysiwyg.editor.detach.markitup = function (context, params, trigger) {
|
||||
if (trigger == 'serialize') {
|
||||
return;
|
||||
}
|
||||
if (typeof params != 'undefined') {
|
||||
$('#' + params.field, context).markItUpRemove();
|
||||
}
|
||||
@@ -26,4 +29,18 @@ Drupal.wysiwyg.editor.detach.markitup = function(context, params) {
|
||||
}
|
||||
};
|
||||
|
||||
Drupal.wysiwyg.editor.instance.markitup = {
|
||||
insert: function (content) {
|
||||
$.markItUp({ replaceWith: content });
|
||||
},
|
||||
|
||||
setContent: function (content) {
|
||||
$('#' + this.field).val(content);
|
||||
},
|
||||
|
||||
getContent: function () {
|
||||
return $('#' + this.field).val();
|
||||
}
|
||||
};
|
||||
|
||||
})(jQuery);
|
||||
|
||||
Reference in New Issue
Block a user