Skip to content

Commit

Permalink
ENH Always load anchors for links on the current page.
Browse files Browse the repository at this point in the history
Anchors can come from additional WYSIWYG fields included inside
associated DataObjects. Don't assume all anchor links on the page are in
this one field.
  • Loading branch information
GuySartorelli committed May 25, 2022
1 parent 740a37f commit 845f0b3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
2 changes: 1 addition & 1 deletion client/dist/js/TinyMCE_sslink-anchor.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions client/src/legacy/TinyMCE_sslink-anchor.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@ const plugin = {
init(editor) {
editor.addCommand(commandName, () => {
const field = jQuery(`#${editor.id}`).entwine('ss');
const currentPageID = Number(jQuery('#Form_EditForm_ID').val() || 0);
const validTargets = editor
.$('[id],[name]', editor.getBody())
.toArray()
.map((element) => element.id || element.name);
ss.store.dispatch(updated(currentPageID, validTargets, true));
field.openLinkAnchorDialog();
});
},
Expand Down

0 comments on commit 845f0b3

Please sign in to comment.