fix rich editor embed image original
This commit is contained in:
File diff suppressed because one or more lines are too long
Vendored
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"main.js": {
|
"main.js": {
|
||||||
"file": "assets/main-BC8xx0YD.js",
|
"file": "assets/main-BLsQ9H2G.js",
|
||||||
"name": "main",
|
"name": "main",
|
||||||
"src": "main.js",
|
"src": "main.js",
|
||||||
"isEntry": true,
|
"isEntry": true,
|
||||||
|
|||||||
@@ -16,7 +16,6 @@
|
|||||||
export let editable = true;
|
export let editable = true;
|
||||||
|
|
||||||
export function insertMedia(info) {
|
export function insertMedia(info) {
|
||||||
|
|
||||||
let insertText = "";
|
let insertText = "";
|
||||||
if (info.record._file.width > 0) {
|
if (info.record._file.width > 0) {
|
||||||
insertText = ``;
|
insertText = ``;
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
<script>
|
<script>
|
||||||
import {sortByField} from "../../edges/sortEdges";
|
|
||||||
import Sortable from "../../libs/Sortable.svelte";
|
|
||||||
import PreviewFile from "../previews/PreviewFile.svelte";
|
import PreviewFile from "../previews/PreviewFile.svelte";
|
||||||
import Dropdown from "../../common/Dropdown.svelte";
|
import Dropdown from "../../common/Dropdown.svelte";
|
||||||
import Dialog from "../../dialog/Dialog.svelte";
|
import Dialog from "../../dialog/Dialog.svelte";
|
||||||
@@ -70,7 +68,8 @@
|
|||||||
{#each references as reference (reference.id)}
|
{#each references as reference (reference.id)}
|
||||||
<!--This div helps the sorting thing-->
|
<!--This div helps the sorting thing-->
|
||||||
<div>
|
<div>
|
||||||
<PreviewFile record={reference} hasDelete={true} hasInsert={true} on:remove={removeReference} on:editor-insert></PreviewFile>
|
<PreviewFile record={reference} hasDelete={true} hasInsert={true} on:remove={removeReference}
|
||||||
|
on:editor-insert></PreviewFile>
|
||||||
</div>
|
</div>
|
||||||
{/each}
|
{/each}
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
@@ -26,9 +26,10 @@
|
|||||||
function insert(e, preset) {
|
function insert(e, preset) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
let html = htmlurl(channel, record, preset)
|
let html = htmlurl(channel, record, preset)
|
||||||
|
let url = !preset ? `/${record._file.path}` : `/templates/${preset}/${record._file.path}`;
|
||||||
dispatch("editor-insert", {
|
dispatch("editor-insert", {
|
||||||
html: html,
|
html: html,
|
||||||
url: channel.filesUrl + `/templates/${preset}/${record._file.path}`,
|
url: channel.filesUrl + url,
|
||||||
originalUrl: channel.filesUrl + "/" + record._file.path,
|
originalUrl: channel.filesUrl + "/" + record._file.path,
|
||||||
record: record
|
record: record
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user