mirror of
https://github.com/Floriansylvain/RenewCMS.git
synced 2026-08-19 11:43:22 +02:00
Fixed TinyMCE implementation with Vite
This commit is contained in:
Vendored
-11
@@ -1,13 +1,2 @@
|
|||||||
/// <reference types="vite/client" />
|
/// <reference types="vite/client" />
|
||||||
declare const __APP_ENV__: Record<string, string>
|
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';
|
|
||||||
Vendored
@@ -43,7 +43,7 @@ const router = createRouter({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/articles/edit/:articleID',
|
path: '/articles/edit/:articleID?',
|
||||||
name: 'edition',
|
name: 'edition',
|
||||||
component: Edition,
|
component: Edition,
|
||||||
meta: {
|
meta: {
|
||||||
|
|||||||
@@ -2,14 +2,11 @@
|
|||||||
import Editor from '@tinymce/tinymce-vue';
|
import Editor from '@tinymce/tinymce-vue';
|
||||||
import { ref, type Ref } from 'vue';
|
import { ref, type Ref } from 'vue';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import tinymceScriptSrc from '@/assets/tinymce/tinymce.min.js?url'
|
|
||||||
|
|
||||||
const articleID = useRoute().params.articleID
|
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 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)
|
const editorData: Ref<string> = ref(defaultData)
|
||||||
|
|
||||||
console.log(articleID)
|
|
||||||
|
|
||||||
function abort() {
|
function abort() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -21,8 +18,8 @@ function saveContent() {
|
|||||||
<template>
|
<template>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div id="editor">
|
<div id="editor">
|
||||||
<Editor :tinymce-script-src="tinymceScriptSrc"
|
<Editor tinymce-script-src="/tinymce/tinymce.min.js"
|
||||||
:init="{ promotion: false, language: 'fr_FR', resize: false, height: '100%' }"
|
:init="{ promotion: false, language: 'fr_FR', resize: false, height: '100%', }"
|
||||||
:plugins="['link', 'codesample']"
|
:plugins="['link', 'codesample']"
|
||||||
toolbar="undo redo | styles | bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | outdent indent | codesample link"
|
toolbar="undo redo | styles | bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | outdent indent | codesample link"
|
||||||
v-model="editorData">
|
v-model="editorData">
|
||||||
|
|||||||
Reference in New Issue
Block a user