Fixed TinyMCE implementation with Vite
This commit is contained in:
1 parent
214168e5ed
commit
19d969c904
66 files changed
+3
-17
No files matched your search
Vendored
-11
@@ -1,13 +1,2 @@
|
||||
/// <reference types="vite/client" />
|
||||
declare const __APP_ENV__: Record<string, string>
|
||||
declare module '@editorjs/paragraph';
|
||||
declare module '@editorjs/list';
|
||||
declare module '@editorjs/warning';
|
||||
declare module '@editorjs/delimiter';
|
||||
declare module '@editorjs/nested-list';
|
||||
declare module '@editorjs/checklist';
|
||||
declare module '@editorjs/quote';
|
||||
declare module '@editorjs/marker';
|
||||
declare module '@editorjs/code';
|
||||
declare module '@editorjs/table';
|
||||
declare module '@editorjs/underline';
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Vendored
File renamed without changes.
@@ -43,7 +43,7 @@ const router = createRouter({
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/articles/edit/:articleID',
|
||||
path: '/articles/edit/:articleID?',
|
||||
name: 'edition',
|
||||
component: Edition,
|
||||
meta: {
|
||||
|
||||
@@ -2,14 +2,11 @@
|
||||
import Editor from '@tinymce/tinymce-vue';
|
||||
import { ref, type Ref } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import tinymceScriptSrc from '@/assets/tinymce/tinymce.min.js?url'
|
||||
|
||||
const articleID = useRoute().params.articleID
|
||||
const defaultData = `<h1>Bienvenue</h1><p>Vous êtes en mode <em>édition</em> d'article.</p><p>Celui-ci semble encore neuf ! Supprimez ces lignes et laissez libre cours à votre imagination :)</p><p>Pour plus d'infos, rendez-vous sur la <a title="Attention, rickroll incoming" href="https:/www.youtube.com/watch?v=dQw4w9WgXcQ" target="_blank" rel="noopener">page d'aide</a>.</p>`
|
||||
const editorData: Ref<string> = ref(defaultData)
|
||||
|
||||
console.log(articleID)
|
||||
|
||||
function abort() {
|
||||
}
|
||||
|
||||
@@ -21,8 +18,8 @@ function saveContent() {
|
||||
<template>
|
||||
<div class="container">
|
||||
<div id="editor">
|
||||
<Editor :tinymce-script-src="tinymceScriptSrc"
|
||||
:init="{ promotion: false, language: 'fr_FR', resize: false, height: '100%' }"
|
||||
<Editor tinymce-script-src="/tinymce/tinymce.min.js"
|
||||
:init="{ promotion: false, language: 'fr_FR', resize: false, height: '100%', }"
|
||||
:plugins="['link', 'codesample']"
|
||||
toolbar="undo redo | styles | bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | outdent indent | codesample link"
|
||||
v-model="editorData">
|
||||
|
||||
Reference in new issue
Block a user