Compare commits

...

43 Commits

Author SHA1 Message Date
fbc0b6f741 Merge pull request 'Merci Xefir ?!!' (#15) from color into master
Reviewed-on: #15
2024-02-04 13:58:20 +00:00
88e072dc8e Merci Xefir ?!! 2024-02-04 14:56:40 +01:00
76d29a0dab Merge pull request 'franchement, je n'y crois plus ...' (#14) from color into master
Reviewed-on: #14
2024-02-03 11:58:31 +00:00
3a3190b6ed franchement, je n'y crois plus ... 2024-02-03 12:58:10 +01:00
b0aa329c42 Merge pull request 'on avance .. je crois ..' (#13) from color into master
Reviewed-on: #13
2024-02-03 11:52:32 +00:00
ad39caa27a on avance .. je crois .. 2024-02-03 12:52:12 +01:00
0955e2cfc3 Merge pull request 'je ne galère presque pas non ..' (#12) from color into master
Reviewed-on: #12
2024-02-03 11:49:58 +00:00
99050b86b0 je ne galère presque pas non .. 2024-02-03 12:49:36 +01:00
776f8a2844 Merge pull request 'vois-je le bout du tunnel ?' (#11) from color into master
Reviewed-on: #11
2024-02-03 11:45:49 +00:00
a805ec15d2 vois-je le bout du tunnel ? 2024-02-03 12:45:27 +01:00
73770ff339 Merge pull request 'est-ce mieux ?' (#10) from color into master
Reviewed-on: #10
2024-02-03 11:41:29 +00:00
07f7c09923 est-ce mieux ? 2024-02-03 12:40:48 +01:00
dacd97fd7b Merge pull request 'chatgpt m'as-tu sauvé ?' (#9) from color into master
Reviewed-on: #9
2024-02-03 11:36:25 +00:00
3e4b8002cd chatgpt m'as-tu sauvé ? 2024-02-03 12:36:03 +01:00
d7cdaa9856 Merge pull request 'et là tu fais quoi ?!' (#8) from color into master
Reviewed-on: #8
2024-02-03 11:26:32 +00:00
a35a27f10d et là tu fais quoi ?! 2024-02-03 12:26:14 +01:00
816e6bc85a Merge pull request 'et maintenant ? c'est ok ? =D' (#7) from color into master
Reviewed-on: #7
2024-02-03 11:17:12 +00:00
e8dd5b11c0 et maintenant ? c'est ok ? =D 2024-02-03 12:16:53 +01:00
55b9205d2b Merge pull request 'merci chatgpt ?' (#6) from color into master
Reviewed-on: #6
2024-02-03 11:08:02 +00:00
d35a231dcd merci chatgpt ? 2024-02-03 12:07:43 +01:00
7bdc97dbd5 Merge pull request 'Revert "et comme ça ? T_T"' (#5) from color into master
Reviewed-on: #5
2024-02-03 10:56:26 +00:00
e35ed43524 Revert "et comme ça ? T_T"
This reverts commit 7742bf808d.
2024-02-03 11:56:00 +01:00
5f271cb06b Merge pull request 'et comme ça ? T_T' (#4) from color into master
Reviewed-on: #4
2024-02-03 10:55:11 +00:00
7742bf808d et comme ça ? T_T 2024-02-03 11:54:48 +01:00
047a5a6359 Merge pull request '(-) trad fr' (#3) from color into master
Reviewed-on: #3
2024-02-03 10:44:41 +00:00
abde4c587b (-) trad fr 2024-02-03 11:44:16 +01:00
c8b4156eba Merge pull request 'mieux comme ça ?' (#2) from color into master
Reviewed-on: #2
2024-02-03 10:41:10 +00:00
9aae61ca45 mieux comme ça ? 2024-02-03 11:40:11 +01:00
2ec1ebccc6 Merge branch 'color'
# Conflicts:
#	desktop/head_tag.html
#	mobile/head_tag.html
2024-02-03 11:27:02 +01:00
f5f36199e6 (-) éléments inutiles, (+) couleurs prédéfinies 2024-02-03 11:11:35 +01:00
Steven (Mon-Discourse)
3f167f5242
Merge pull request #12 from Arkshine/user-new-api
DEV: Switch to new addComposerToolbarPopupMenuOption plugin API
2023-11-07 13:31:56 +01:00
Arkshine
0a735d72d9
DEV: Switch to new addComposerToolbarPopupMenuOption plugin API 2023-11-07 00:05:58 +01:00
Steven (Mon-Discourse)
1cc5d51137
Merge pull request #11 from kewisch/floatclear
Offer floatc to clear floats
2023-08-25 19:19:49 +02:00
Philipp Kewisch
d0f1138305 Offer floatc to clear floats 2023-08-25 16:59:34 +02:00
mondiscourse
65cb9b10e7 Merge branch 'master' of https://github.com/MonDiscourse/md-composer-extras 2023-01-16 18:58:17 +01:00
mondiscourse
7ff1bf5869 FIX "sup" on mobile
Reported by Dan DeMontmorency on meta
2023-01-16 18:58:14 +01:00
Steven (Mon-Discourse)
796fe3e2f7
Merge pull request #10 from pfaffman/patch-1
Update head_tag.html
2022-03-03 21:20:57 +01:00
Jay Pfaffman
bd353201e3
Update head_tag.html
Fixes:

```
To prevent errors in tests, add a `pluginId` key to your `modifyClass` call. This will ensure the modification is only applied once.
```
2022-03-03 06:20:43 -08:00
iunctis.fr
43f2190a89
FIX: error on mobile javascript 2020-08-10 20:03:21 +02:00
iunctis.fr
c521c18da4
Update head_tag.html 2020-08-10 15:26:49 +02:00
iunctis.fr
c5b28c8651
Update head_tag.html 2020-08-10 15:24:38 +02:00
iunctis.fr
01de9708d0
Update settings.yml 2020-08-10 15:23:12 +02:00
iunctis.fr
1e889da3fd
Update settings.yml 2020-08-10 15:21:38 +02:00
7 changed files with 196 additions and 75 deletions

1
.discourse-compatibility Normal file
View File

@ -0,0 +1 @@
< 3.2.0.beta2: 1cc5d51137652c3977640f064739a08b1d1fe1be

View File

@ -1,4 +1,4 @@
# MD Composer Extras # MD Composer ~~Extras~~ Color Plus Ultra
This Discourse theme component adds formatting options to your Discourse composer. This Discourse theme component adds formatting options to your Discourse composer.
@ -7,11 +7,12 @@ This Discourse theme component adds formatting options to your Discourse compose
* superscript * superscript
* subscript * subscript
* center * center
* align right * ~~align right~~
* justify * justify
* float left * ~~float left~~
* float right * ~~float right~~
* columns. * ~~columns~~.
* Colorer le texte en bleu, rose, jaune, orange, rouge et vert.
These additions are responsive for desktops and phones, but not for horizon orientation or tablets. These additions have taken into consideration [Slick](https://github.com/discourse/Discourse-Slick-image-gallery), [Tiles](https://github.com/discourse/Discourse-Tiles-image-gallery), and [Events](https://github.com/angusmcleod/discourse-events) when determining what should be placed on the composer bar or in the composer pop out menu. These additions are responsive for desktops and phones, but not for horizon orientation or tablets. These additions have taken into consideration [Slick](https://github.com/discourse/Discourse-Slick-image-gallery), [Tiles](https://github.com/discourse/Discourse-Tiles-image-gallery), and [Events](https://github.com/angusmcleod/discourse-events) when determining what should be placed on the composer bar or in the composer pop out menu.
@ -63,3 +64,5 @@ I took some parts of the Iconified Header Links and Slick Image Gallery theme co
https://meta.discourse.org/t/iconified-header-links/86307 (adding fa5 icons in the theme component) https://meta.discourse.org/t/iconified-header-links/86307 (adding fa5 icons in the theme component)
https://meta.discourse.org/t/slick-image-gallery/81952 (manager the translations inside the theme component) https://meta.discourse.org/t/slick-image-gallery/81952 (manager the translations inside the theme component)
Modification de la branche `color` pour l'ajout de couleurs prédéfinies par l'association Camélia Studio : https://camelia-studio.org

View File

@ -6,7 +6,7 @@
margin-right: 5px; margin-right: 5px;
} }
[data-wrap="columns"] > p, [data-wrap="floatl"] > p, [data-wrap="floatr"] > p { [data-wrap="columns"] > p, [data-wrap="floatl"] > p, [data-wrap="floatr"] > p, [data-wrap="floatc"] > p {
margin-top: 0; margin-top: 0;
margin-bottom: 0; margin-bottom: 0;
} }
@ -20,3 +20,7 @@
float: right; float: right;
margin-left: 10px; margin-left: 10px;
} }
[data-wrap="floatc"] {
clear: both;
}

View File

@ -41,14 +41,6 @@ api.onToolbarCreate(toolbar => {
perform: e => e.applySurround('[wrap="center"]\n', '\n[/wrap]', 'align_center_text') perform: e => e.applySurround('[wrap="center"]\n', '\n[/wrap]', 'align_center_text')
}); });
}); });
api.onToolbarCreate(toolbar => {
toolbar.addButton({
id: "align_right_button",
group: "extras",
icon: "align-right",
perform: e => e.applySurround('[wrap="right"]\n', '\n[/wrap]', 'align_right_text')
});
});
api.onToolbarCreate(toolbar => { api.onToolbarCreate(toolbar => {
toolbar.addButton({ toolbar.addButton({
id: "align_justify_button", id: "align_justify_button",
@ -61,27 +53,73 @@ api.onToolbarCreate(toolbar => {
// EXTRAS // EXTRAS
api.addToolbarPopupMenuOptionsCallback(() => { api.addToolbarPopupMenuOptionsCallback(() => {
return { return {
action: "floatleft", id: "bleu_color",
icon: "indent", action: "bleucolor",
label: "float_left_button" icon: "palette",
label: "bleu_color_button"
}; };
}); });
api.addToolbarPopupMenuOptionsCallback(() => { api.addToolbarPopupMenuOptionsCallback(() => {
return { return {
action: "columns", id: "rose_color",
icon: "columns", action: "rosecolor",
label: "columns_button" icon: "palette",
label: "rose_color_button"
};
});
api.addToolbarPopupMenuOptionsCallback(() => {
return {
id: "jaune_color",
action: "jaunecolor",
icon: "palette",
label: "jaune_color_button"
};
});
api.addToolbarPopupMenuOptionsCallback(() => {
return {
id: "orange_color",
action: "orangecolor",
icon: "palette",
label: "orange_color_button"
};
});
api.addToolbarPopupMenuOptionsCallback(() => {
return {
id: "rouge_color",
action: "rougecolor",
icon: "palette",
label: "rouge_color_button"
};
});
api.addToolbarPopupMenuOptionsCallback(() => {
return {
id: "vert_color",
action: "vertcolor",
icon: "palette",
label: "vert_color_button"
}; };
}); });
api.modifyClass("controller:composer", { api.modifyClass("controller:composer", {
actions: { actions: {
floatleft() { bleucolor() {
this.get("toolbarEvent").applySurround('[wrap="floatl"]\n', '\n[/wrap]', "float_left_text"); this.get("toolbarEvent").applySurround('[color=#068EEF]', '[/color]', "bleu_color_text");
},
rosecolor() {
this.get("toolbarEvent").applySurround('[color=#EF06A0]', '[/color]', "rose_color_text");
},
jaunecolor() {
this.get("toolbarEvent").applySurround('[color=#EFC906]', '[/color]', "jaune_color_text");
},
orangecolor() {
this.get("toolbarEvent").applySurround('[color=#EF8806]', '[/color]', "orange_color_text");
},
rougecolor() {
this.get("toolbarEvent").applySurround('[color=#EF0606]', '[/color]', "rouge_color_text");
},
vertcolor() {
this.get("toolbarEvent").applySurround('[color=#2A821C]', '[/color]', "vert_color_text");
}, },
columns() {
this.get("toolbarEvent").applySurround('[wrap="columns"]\n', '\n[/wrap]', "columns_text");
}
} }
}); });
@ -102,10 +140,6 @@ translations.composer.align_center_button_title = settings.align_center_button;
translations.composer.align_center_text = translations.composer.align_center_text =
settings.align_center_text; settings.align_center_text;
translations.composer.align_right_button_title = settings.align_right_button;
translations.composer.align_right_text =
settings.align_right_text;
translations.composer.align_justify_button_title = settings.align_justify_button; translations.composer.align_justify_button_title = settings.align_justify_button;
translations.composer.align_justify_text = translations.composer.align_justify_text =
settings.align_justify_text; settings.align_justify_text;
@ -122,12 +156,28 @@ translations.composer.subscript_button_title = settings.subscript_button;
translations.composer.subscript_text = translations.composer.subscript_text =
settings.subscript_text; settings.subscript_text;
translations.columns_button = settings.columns_button; translations.bleu_color_button = settings.bleu_color_button;
translations.composer.columns_text = translations.composer.bleu_color_text =
settings.columns_text; settings.bleu_color_text;
translations.float_left_button = settings.float_left_button; translations.rose_color_button = settings.rose_color_button;
translations.composer.float_left_text = translations.composer.rose_color_text =
settings.float_left_text; settings.rose_color_text;
translations.jaune_color_button = settings.jaune_color_button;
translations.composer.jaune_color_text =
settings.jaune_color_text;
translations.orange_color_button = settings.orange_color_button;
translations.composer.orange_color_text =
settings.orange_color_text;
translations.rouge_color_button = settings.rouge_color_button;
translations.composer.rouge_color_text =
settings.rouge_color_text;
translations.vert_color_button = settings.vert_color_button;
translations.composer.vert_color_text =
settings.vert_color_text;
</script> </script>

View File

@ -61,6 +61,14 @@ api.addToolbarPopupMenuOptionsCallback(() => {
}; };
}); });
api.addToolbarPopupMenuOptionsCallback(() => {
return {
action: "bbcodecolor",
icon: "palette",
label: "bbcode_color_button"
};
});
api.modifyClass("controller:composer", { api.modifyClass("controller:composer", {
actions: { actions: {
strikethrough() { strikethrough() {
@ -83,6 +91,9 @@ api.modifyClass("controller:composer", {
}, },
floatleft() { floatleft() {
this.get("toolbarEvent").applySurround('[wrap="floatl"]\n', '\n[/wrap]', "float_left_text"); this.get("toolbarEvent").applySurround('[wrap="floatl"]\n', '\n[/wrap]', "float_left_text");
},
bbcodecolor() {
this.get("toolbarEvent").applySurround('[color=#222]', '[/color]', "bbcode_color_text");
} }
} }
}); });
@ -132,4 +143,8 @@ translations.float_left_button = settings.float_left_button;
translations.composer.float_left_text = translations.composer.float_left_text =
settings.float_left_text; settings.float_left_text;
translations.bbcode_color_button = settings.bbcode_color_button;
translations.composer.bbcode_color_text =
settings.bbcode_color_text;
</script> </script>

View File

@ -14,4 +14,5 @@
[data-wrap="floatr"] { [data-wrap="floatr"] {
} }
[data-wrap="floatc"] {
}

View File

@ -1,79 +1,126 @@
underline_button: underline_button:
default: "Underline" default: "Souligner"
description: description:
en: Enter the text for the title of the button in the composer. en: Enter the text for the title of the button in the composer.
fr: Saisissez le texte du titre du bouton dans le compositeur.
underline_text: underline_text:
default: "Text" default: "Texte"
description: description:
en: Enter the placeholder text that appears in the composer after the user clicks the button. en: Enter the placeholder text that appears in the composer after the user clicks the button.
fr: Saisissez le texte de remplacement qui apparaît dans le compositeur après que l'utilisateur a cliqué sur le bouton.
align_center_button: align_center_button:
default: "Center" default: "Centrer"
description: description:
en: Enter the text for the title of the button in the composer. en: Enter the text for the title of the button in the composer.
fr: Saisissez le texte du titre du bouton dans le compositeur.
align_center_text: align_center_text:
default: "Text" default: "Texte"
description:
en: Enter the placeholder text that appears in the composer after the user clicks the button.
align_right_button:
default: "Align right"
description:
en: Enter the text for the title of the button in the composer.
align_right_text:
default: "Text"
description: description:
en: Enter the placeholder text that appears in the composer after the user clicks the button. en: Enter the placeholder text that appears in the composer after the user clicks the button.
fr: Saisissez le texte de remplacement qui apparaît dans le compositeur après que l'utilisateur a cliqué sur le bouton.
align_justify_button: align_justify_button:
default: "Justify" default: "Justifier"
description: description:
en: Enter the text for the title of the button in the composer. en: Enter the text for the title of the button in the composer.
fr: Saisissez le texte du titre du bouton dans le compositeur.
align_justify_text: align_justify_text:
default: "Text" default: "Texte"
description: description:
en: Enter the placeholder text that appears in the composer after the user clicks the button. en: Enter the placeholder text that appears in the composer after the user clicks the button.
fr: Saisissez le texte de remplacement qui apparaît dans le compositeur après que l'utilisateur a cliqué sur le bouton.
strikethrough_button: strikethrough_button:
default: "Strike-through" default: "Barrer"
description: description:
en: Enter the text for the title of the button in the composer. en: Enter the text for the title of the button in the composer.
fr: Saisissez le texte du titre du bouton dans le compositeur.
strikethrough_text: strikethrough_text:
default: "Text" default: "Texte"
description:
en: Enter the placeholder text that appears in the composer after the user clicks the button.
float_left_button:
default: "Float left"
description:
en: Enter the text for the title of the button in the composer.
float_left_text:
default: "Text"
description: description:
en: Enter the placeholder text that appears in the composer after the user clicks the button. en: Enter the placeholder text that appears in the composer after the user clicks the button.
fr: Saisissez le texte de remplacement qui apparaît dans le compositeur après que l'utilisateur a cliqué sur le bouton.
superscript_button: superscript_button:
default: "Superscript" default: "Exposant"
description: description:
en: Enter the text for the title of the button in the composer. en: Enter the text for the title of the button in the composer.
fr: Saisissez le texte du titre du bouton dans le compositeur.
superscript_text: superscript_text:
default: "Text" default: "Texte"
description: description:
en: Enter the placeholder text that appears in the composer after the user clicks the button. en: Enter the placeholder text that appears in the composer after the user clicks the button.
fr: Saisissez le texte de remplacement qui apparaît dans le compositeur après que l'utilisateur a cliqué sur le bouton.
subscript_button: subscript_button:
default: "Subscript" default: "Indice"
description: description:
en: Enter the text for the title of the button in the composer. en: Enter the text for the title of the button in the composer.
fr: Saisissez le texte du titre du bouton dans le compositeur.
subscript_text: subscript_text:
default: "Text" default: "Texte"
description: description:
en: Enter the placeholder text that appears in the composer after the user clicks the button. en: Enter the placeholder text that appears in the composer after the user clicks the button.
columns_button: fr: Saisissez le texte de remplacement qui apparaît dans le compositeur après que l'utilisateur a cliqué sur le bouton.
default: "Columns" bleu_color_button:
default: "Colorer en bleu"
description: description:
en: Enter the text for the title of the button in the composer. en: Enter the text for the title of the button in the composer.
columns_text: fr: Saisissez le texte du titre du bouton dans le compositeur.
default: "Use the closing tag to mark where the first column ends. The second column will autobreak." bleu_color_text:
default: "Texte"
description: description:
en: Enter the placeholder text that appears in the composer after the user clicks the button. en: Enter the placeholder text that appears in the composer after the user clicks the button.
fr: Saisissez le texte de remplacement qui apparaît dans le compositeur après que l'utilisateur a cliqué sur le bouton.
rose_color_button:
default: "Colorer en rose"
description:
en: Enter the text for the title of the button in the composer.
fr: Saisissez le texte du titre du bouton dans le compositeur.
rose_color_text:
default: "Texte"
description:
en: Enter the placeholder text that appears in the composer after the user clicks the button.
fr: Saisissez le texte de remplacement qui apparaît dans le compositeur après que l'utilisateur a cliqué sur le bouton.
jaune_color_button:
default: "Colorer en jaune"
description:
en: Enter the text for the title of the button in the composer.
fr: Saisissez le texte du titre du bouton dans le compositeur.
jaune_color_text:
default: "Texte"
description:
en: Enter the placeholder text that appears in the composer after the user clicks the button.
fr: Saisissez le texte de remplacement qui apparaît dans le compositeur après que l'utilisateur a cliqué sur le bouton.
orange_color_button:
default: "Colorer en orange"
description:
en: Enter the text for the title of the button in the composer.
fr: Saisissez le texte du titre du bouton dans le compositeur.
orange_color_text:
default: "Texte"
description:
en: Enter the placeholder text that appears in the composer after the user clicks the button.
fr: Saisissez le texte de remplacement qui apparaît dans le compositeur après que l'utilisateur a cliqué sur le bouton.
rouge_color_button:
default: "Colorer en rouge"
description:
en: Enter the text for the title of the button in the composer.
fr: Saisissez le texte du titre du bouton dans le compositeur.
rouge_color_text:
default: "Texte"
description:
en: Enter the placeholder text that appears in the composer after the user clicks the button.
fr: Saisissez le texte de remplacement qui apparaît dans le compositeur après que l'utilisateur a cliqué sur le bouton.
vert_color_button:
default: "Colorer en vert"
description:
en: Enter the text for the title of the button in the composer.
fr: Saisissez le texte du titre du bouton dans le compositeur.
vert_color_text:
default: "Texte"
description:
en: Enter the placeholder text that appears in the composer after the user clicks the button.
fr: Saisissez le texte de remplacement qui apparaît dans le compositeur après que l'utilisateur a cliqué sur le bouton.
Svg_icons: Svg_icons:
type: 'list' type: 'list'
list_type: 'compact' list_type: 'compact'
default: 'fa-align-center|fa-align-right|fa-align-justify|fa-strikethrough|fa-underline|fa-indent|fa-columns|fa-superscript|fa-subscript' default: 'fa-align-center|fa-align-justify|fa-strikethrough|fa-underline|fa-indent|fa-superscript|fa-subscript|fa-palette'
description: description:
en: "Include FontAwesome 5 icon classes for each icon used in the list." en: "Include FontAwesome 5 icon classes for each icon used in the list."