You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the issue? The MU.insertDiv functionality was added as part of the work on #178. There is an minor SwiftUI demo of it in SwiftUIDemo/DivsContentView.swift, but there isn't any documentation of how to use it beyond the code in this demo. Unless you are working on a project that needs to have multiple contenteditable divs within a single document, then this is probably not something you are going to want to use.
MU.insertDiv = function(string,alt) {
const div = _inserDivAtSelection(string, alt);
}
const _inserDivAtSelection = function(string, alt, dimensions) {
const sel = document.getSelection();
const range = sel.getRangeAt(0);
const div = document.createElement('div');
range.insertNode(div);
var newContent = document.createTextNode(string);
div.appendChild(newContent);
return div;
};
The text was updated successfully, but these errors were encountered: