PrestaShop / PrestaShop

PrestaShop is the universal open-source software platform to build your e-commerce solution.
https://www.prestashop-project.org/
Other
8.08k stars 4.79k forks source link

Add more functions to tinymce in admin panel #12417

Open SharakPL opened 5 years ago

SharakPL commented 5 years ago

This may seem like a good enough set of functions:

obraz

but "Clear formatting" function is also a must. Most of the time content is copy-pasted from some docs and it brings all the styling set in these docs. In prestashop 1.7 there's no way to clear this so you have to paste plain text and do html structure all over again. Please add Clear formatting option 🙏

Other tinymce functions I often look for while editing content is:

khouloudbelguith commented 5 years ago

Hi @SharakPL,

Thanks for your suggestion. It could an improvement issue for the PS1.7. Would you be able to do a PR for this improvement? @colinegin @marionf what do you think of his improvement? Thanks!

colinegin commented 5 years ago

@eternoendless and @PrestaShop/prestashop-core-developers what do you think of this suggestion ? Is it technically complex ?

jolelievre commented 5 years ago

Hi @SharakPL did you try to paste your text using Ctrl + Shift + V (or Cmd + Shift + V on Mac) It copies your texte as raw texte without any formatting (also works in Gmail), it prevents you from copying your text in texteditor (Notepad and such) It actually saves me a lot of time

Maybe this could solve your issue? (or at least provide a temporary solution)

SharakPL commented 5 years ago

@jolelievre you're saviour. Thanks! Still at least a popup with this shortcut and some other useful would be helpful...

jolelievre commented 5 years ago

@SharakPL you're welcome! ;) Of course it's just a tip, it doesn't close this discussion nor this issue.

To answer your question @colinegin it shouldn't be complex to modify it, it is only a config in tinymce: https://www.tiny.cloud/docs/configure/editor-appearance/#toolbarn The question would be more about a reflexion of which buttons/features we want to add, here is the list of available controls: https://www.tiny.cloud/docs/advanced/editor-control-identifiers/#toolbarcontrols

Or a more advanced modif would be to allow users to customize their editor configuration.

PierreRambaud commented 5 years ago

Before adding features to TinyMce, we need to use the latest version, with npm.. :roll_eyes:

SharakPL commented 5 years ago

@jolelievre unfortunately Ctrl + Shift + V doesn't work good enough as it strips also all HTML tags and leaves only 1 paragraph and some breaks. Turns out TinyMce's Clear formatting function is needed to clean only the styles and leave all separate paragraphs, headings, lists etc.

ghost commented 5 years ago

Hi @SharakPL Thanks for the feedback ! That's a good idea. We will look into which Release roadmap we will be able to add it. We won't be able to do it for the 1.7.6, as Pierre said we have to update our dependencies first and it will be done later.

We might use this time to ask the community more globally which features they would like to see in the TinyMce editor. Stay tuned 🙂

For the moment, I can recommend you to paste your text in a basic text editor such as Notepad or Sublime Text. It removes all styling while keeping html tags.

SharakPL commented 5 years ago

For the moment, I can recommend you to paste your text in a basic text editor such as Notepad or Sublime Text.

It's easier to paste directly into tinymce editor with CTRL+SHIFT+V like @jolelievre suggested as you get the same effect and skip the notepad step, but it's still PITA to do it this way if you have a lot of content to format

hibatallahAouadni commented 3 years ago

Ping @PrestaShop/product-team what's the status of this issue?

SharakPL commented 3 years ago

@hibatallahAouadni what is @PrestaShop/product-team? I get 404

khouloudbelguith commented 3 years ago

Hi @SharakPL,

It is only displayed to our member team. This link is provided to ping our product team :slightly_smiling_face:

Thank you!

SharakPL commented 3 years ago

@khouloudbelguith thank you. @github It should be some kind of access restricted message instead, because 404 is rather misleading. Looks like wrong link target.