mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
prevent pasting svg copied from excalidraw (#1288)
* prevent pasting svg copied from excalidraw * remove unnecessary template
This commit is contained in:
parent
e9b4700bba
commit
729aeacc47
2 changed files with 9 additions and 1 deletions
|
@ -6,6 +6,8 @@ import { distance, SVG_NS } from "../utils";
|
|||
import { normalizeScroll } from "./scroll";
|
||||
import { AppState } from "../types";
|
||||
|
||||
export const SVG_EXPORT_TAG = `<!-- svg-source:excalidraw -->`;
|
||||
|
||||
export function exportToCanvas(
|
||||
elements: readonly ExcalidrawElement[],
|
||||
appState: AppState,
|
||||
|
@ -86,6 +88,7 @@ export function exportToSvg(
|
|||
svgRoot.setAttribute("viewBox", `0 0 ${width} ${height}`);
|
||||
|
||||
svgRoot.innerHTML = `
|
||||
${SVG_EXPORT_TAG}
|
||||
<defs>
|
||||
<style>
|
||||
@font-face {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue