mirror of
https://github.com/leporello-js/leporello-js
synced 2026-01-13 21:14:28 -08:00
display SVG within code
This commit is contained in:
@@ -267,7 +267,14 @@ export class Editor {
|
|||||||
if(ok) {
|
if(ok) {
|
||||||
if(value instanceof globalThis.app_window.Element && !value.isConnected) {
|
if(value instanceof globalThis.app_window.Element && !value.isConnected) {
|
||||||
is_dom_el = true
|
is_dom_el = true
|
||||||
|
if(value instanceof globalThis.app_window.SVGElement) {
|
||||||
|
// Create svg context
|
||||||
|
const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg')
|
||||||
|
svg.appendChild(value)
|
||||||
|
content.appendChild(svg)
|
||||||
|
} else {
|
||||||
content.appendChild(value)
|
content.appendChild(value)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
is_dom_el = false
|
is_dom_el = false
|
||||||
const exp = new ValueExplorer({
|
const exp = new ValueExplorer({
|
||||||
|
|||||||
Reference in New Issue
Block a user