mirror of
https://github.com/silverstripe/silverstripe-dms
synced 2024-10-22 14:05:56 +02:00
FIX Missing shortcode field and broken Javascript when inserting document in TinyMCE
This commit is contained in:
parent
77f137fcda
commit
6a67cddc38
@ -26,6 +26,8 @@ class DocumentHtmlEditorFieldToolbar extends Extension
|
||||
$addExistingField->setUseFieldClass(false);
|
||||
$fieldList->insertAfter($addExistingField, 'Description');
|
||||
|
||||
$fieldList->push(HiddenField::create('DMSShortcodeHandlerKey', false, DMS::inst()->getShortcodeHandlerKey()));
|
||||
|
||||
// Requirements::javascript(SAPPHIRE_DIR . "/thirdparty/behaviour/behaviour.js");
|
||||
// Requirements::javascript(SAPPHIRE_DIR . "/javascript/tiny_mce_improvements.js");
|
||||
//
|
||||
|
@ -92,7 +92,7 @@
|
||||
}
|
||||
|
||||
// Match a document or call the regular link handling
|
||||
if (href.match(new RegExp("/^\[" + this.getShortcodeKey() + "(\s*|%20|,)?id=([0-9]+)\]?$/", "i"))) {
|
||||
if (href.match(new RegExp('^\\[' + this.getShortcodeKey() + '(\s*|%20|,)?id=([0-9]+)\\]?$', 'i'))) {
|
||||
var returnArray = {
|
||||
LinkType: 'document',
|
||||
DocumentID: RegExp.$2,
|
||||
|
Loading…
Reference in New Issue
Block a user