Replies: 1 comment
-
Manipulating the DOM by javascript: const editor = SUNEDITOR.create((document.getElementById('sample') || 'sample'),{
// ...
});
editor.onload = function (e) {
// Remove the Link tab from the Insert Image dialog box
Array.from(document.querySelectorAll('[data-tab-link="url"]')).forEach(element => element.remove());
// Remove the Link content area from the Insert Image dialog box
Array.from(document.getElementsByClassName('_se_tab_content_url')).forEach((item)=>{item.remove()});
// Remove all "Download Link" checkboxes
Array.from(document.getElementsByClassName('_se_anchor_download')).forEach(element => element.parentNode && element.parentNode.remove());
}; |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How to hidden "Download link" checkbox in "Insert Link" dialog ?
I don't want to allow anyone to add download links. This could allow users to create download links that potentially contain malicious programs.
How to hidden "Link" tab in "Insert image" dialog ?
Beta Was this translation helpful? Give feedback.
All reactions