Giter VIP home page Giter VIP logo

hyphenator's Introduction

Hyphenator

Addon für REDAXO 5: Ermöglicht Silbentrennung auf Basis von PHP.

Screenshot

Funktion

Das Addon verwendet die Hyphenator-Bibliothek, um eine serverseitige Silbentrennung — hier also PHP und nicht JavaScript, worauf andere Silbentrenner häufig basieren — zu ermöglichen. Diese nutzt verschiedene Algorithmen, um Stellen innerhalb von Wörten zu finden, an denen getrennt werden kann. Das Addon fügt an diesen Stellen ein Trennzeichen ein, das üblicherweise ­ ist, jedoch innerhalb der Addon-Konfiguration frei definiert werden kann.

Screenshot

Verwendung

Code-Beispiele zur Verwendung innerhalb eines Modul-Outputs:

// Text (aktuelle Sprache):
echo hyphenator::hyphenate('REX_VALUE[id=1]');

// Text (andere Sprache):
echo hyphenator::hyphenate('REX_VALUE[id=1]', 'en');

// Markup:
echo hyphenator::hyphenate('REX_VALUE[id=1 output=html]');

// Textile im MarkItUp Editor:
$textile = rex_markitup::parseOutput('textile', 'REX_VALUE[id=1 output="html"]');
echo hyphenator::hyphenate($textile);

Anmerkungen

  • WebKit (Safari, Opera) hat Probleme mit ­ in manchen WOFF-Webfonts. Es tauchen dann an der Stelle des Umbruchs eigenartige Zeichen auf (siehe Bugtracker-Issue).
    Als Workaround kann <i></i>&shy; als Trennzeichen verwendet werden, was das Addon in der Standardkonfiguration bereits eigenständig übernimmt.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.