Skip to content

High performance, self-hosted, newsletter and mailing list manager with a modern dashboard. Single binary app.

Add left/right float options to TinyMCE image popup. Closes #2865.

Kailash Nadh29c406f0366f
diff --git a/frontend/src/components/RichtextEditor.vue b/frontend/src/components/RichtextEditor.vue
index 886385ac..a5c2a4cf 100644
--- a/frontend/src/components/RichtextEditor.vue
+++ b/frontend/src/components/RichtextEditor.vue
@@ -192,6 +192,8 @@ export default {
content_style: `
body { font-family: 'Inter', sans-serif; font-size: 15px; }
img { max-width: 100%; }
+ img.img-float-left { float: left; margin: 0 1em 1em 0; }
+ img.img-float-right { float: right; margin: 0 0 1em 1em; }
a { color: ${colors.primary}; }
table, td { border-color: #ccc;}
`,
@@ -199,6 +201,13 @@ export default {
language: LANGS[lang] || null,
language_url: LANGS[lang] ? `${uris.static}/tinymce/lang/${LANGS[lang]}.js` : null,
+ image_advtab: true,
+ image_class_list: [
+ { title: 'None', value: '' },
+ { title: 'Float left', value: 'img-float-left' },
+ { title: 'Float right', value: 'img-float-right' },
+ ],
+
file_picker_types: 'image',
file_picker_callback: (callback) => {
this.isMediaVisible = true;