Dan Brown ebe2ca7faf
Some checks failed
test-php / build (8.1) (push) Has been cancelled
test-php / build (8.2) (push) Has been cancelled
test-php / build (8.3) (push) Has been cancelled
test-php / build (8.4) (push) Has been cancelled
analyse-php / build (push) Has been cancelled
lint-js / build (push) Has been cancelled
lint-php / build (push) Has been cancelled
test-js / build (push) Has been cancelled
test-migrations / build (8.1) (push) Has been cancelled
test-migrations / build (8.2) (push) Has been cancelled
test-migrations / build (8.3) (push) Has been cancelled
test-migrations / build (8.4) (push) Has been cancelled
Lexical: Added about button/view
Re-used existing route and moved tinymce help to its own different
route. Added test to cover.
Added new external-content block to support in editor UI.
2024-12-17 22:40:28 +00:00

30 lines
638 B
TypeScript

import {EditorUiElement} from "../core";
import {el} from "../../../utils/dom";
export class ExternalContent extends EditorUiElement {
/**
* The URL for HTML to be loaded from.
*/
protected url: string = '';
constructor(url: string) {
super();
this.url = url;
}
buildDOM(): HTMLElement {
const wrapper = el('div', {
class: 'editor-external-content',
});
window.$http.get(this.url).then(resp => {
if (typeof resp.data === 'string') {
wrapper.innerHTML = resp.data;
}
});
return wrapper;
}
}