Download
We're evolving to serve you better! This current forum has transitioned to read-only mode. For new discussions, support, and engagement, we've moved to GitHub Discussions.

Automatically convert pre-defined text in TinyMCE or on render

  • #8745
    Avatar photo[anonymous]

    Hi,

    I am currently in the process of converting several existing sites over to Publii (great software, thank you for the work!) and have ran into some potential missing features that would make things much easier if implemented.

    One such feature is something that WordPress, for example, does by default: replacing pre-defined pieces of text with better alternatives when rendering the page:

    • “–” becomes “—” (em dash)
    • “; )” becomes ” ;-)” (text to Unicode emoticons)
    • etc.

    Would it be possible to have such functionality implemented in Publii — either at the editing level (in TinyMCE) or at the point of rendering? Ideally, with configuration options to allow definition of custom replacements (like the macOS keyboard settings for example), but any initial implementation would be great; a plugin would also work.

    Here is a thread discussing this for TinyMCE, it appears pretty easy to set up:

    https://stackoverflow.com/questions/8032294/automatically-convert-two-dashes-into-an-mdash-in-tinymce

    Thank you!

    #8757
    Avatar photo[anonymous]

    Interesting idea and a good one. For example, if you have an author that uses a term that you do want to appear on your site, think ordinarily accepted swear word in some cultures such as the UK, you should be able to “translate” this term into something more acceptable. This feature appears in other CMSs.

    I would vote for this feature.

    Cheers!!