mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #7059 from mfendeksilverstripe/3.5
Html editor selection is now properly stored while the dialog is open
This commit is contained in:
commit
f769d9a13f
@ -868,14 +868,15 @@ ss.editorWrappers['default'] = ss.editorWrappers.tinyMCE;
|
|||||||
// // Element contains a link
|
// // Element contains a link
|
||||||
// var firstLinkEl = selectedEl.find('a:first');
|
// var firstLinkEl = selectedEl.find('a:first');
|
||||||
// if(firstLinkEl.length) linkDataSource = firstLinkEl;
|
// if(firstLinkEl.length) linkDataSource = firstLinkEl;
|
||||||
|
|
||||||
|
// if(linkDataSource && linkDataSource.length) this.modifySelection(function(ed){
|
||||||
|
// ed.selectNode(linkDataSource[0]);
|
||||||
|
// });
|
||||||
} else {
|
} else {
|
||||||
// Element is a child of a link
|
// Element is a child of a link
|
||||||
linkDataSource = selectedEl = selectedEl.parents('a:first');
|
linkDataSource = selectedEl = selectedEl.parents('a:first');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(linkDataSource && linkDataSource.length) this.modifySelection(function(ed){
|
|
||||||
ed.selectNode(linkDataSource[0]);
|
|
||||||
});
|
|
||||||
|
|
||||||
// Is anchor not a link
|
// Is anchor not a link
|
||||||
if (!linkDataSource.attr('href')) linkDataSource = null;
|
if (!linkDataSource.attr('href')) linkDataSource = null;
|
||||||
|
Loading…
Reference in New Issue
Block a user