mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
MINOR Moved tinymce initialization from LeftAndMain.js to LeftAndMain.EditForm.js and converted to use concrete
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@92698 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
ffb6790fe6
commit
5e4fa55472
@ -307,4 +307,23 @@
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
/**
|
||||
* @class Add tinymce to HtmlEditorFields within the CMS.
|
||||
* @name ss.Form_EditForm.textarea.htmleditor
|
||||
*/
|
||||
$('#Form_EditForm textarea.htmleditor').concrete('ss', function($){
|
||||
return/** @lends ss.Form_EditForm.Actions.submit */{
|
||||
onmatch : function() {
|
||||
tinyMCE.execCommand("mceAddControl", true, this.attr('id'));
|
||||
this.isChanged = function() {
|
||||
return tinyMCE.getInstanceById(this.attr('id')).isDirty();
|
||||
}
|
||||
this.resetChanged = function() {
|
||||
var inst = tinyMCE.getInstanceById(this.attr('id'));
|
||||
if (inst) inst.startContent = tinymce.trim(inst.getContent({format : 'raw', no_events : 1}));
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
}(jQuery));
|
@ -306,19 +306,4 @@ returnFalse = function() {
|
||||
|
||||
function nullConverter(url) {
|
||||
return url;
|
||||
}
|
||||
|
||||
Behaviour.register({
|
||||
'textarea.htmleditor' : {
|
||||
initialize : function() {
|
||||
tinyMCE.execCommand("mceAddControl", true, this.id);
|
||||
this.isChanged = function() {
|
||||
return tinyMCE.getInstanceById(this.id).isDirty();
|
||||
}
|
||||
this.resetChanged = function() {
|
||||
inst = tinyMCE.getInstanceById(this.id);
|
||||
if (inst) inst.startContent = tinymce.trim(inst.getContent({format : 'raw', no_events : 1}));
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
Loading…
Reference in New Issue
Block a user