Coder Social home page Coder Social logo

special-character-input's Introduction

special-character-input

Plain javascript for adding a minimalistic UTF-8 character selection.

Ugly Demo: https://dainst.github.io/special-character-input

General

Setup in Koha

We added the following function to our IntranetUserJS:

function loadSpecialCharacterSelection(){
  var fileRef = document.createElement('script')
  fileRef.setAttribute("type","text/javascript")
  fileRef.setAttribute("src", "/intranet-tmpl/prog/js/specialCharacters.js")
  
  document.querySelector("head").appendChild(fileRef);
}

As you can see, the javascript (and implicitely JSON) file is expected to be found at /intranet-tmpl/prog/js by default. If you want to change the paths, you have to either edit the snippet above AND the javascript file for the new JSON path, or you can do something like this:

var specialCharactersJsonPath = "/path/to/json/specialCharacters.json"

function loadSpecialCharacterSelection(){
  var fileRef = document.createElement('script')
  fileRef.setAttribute("type","text/javascript")
  fileRef.setAttribute("src", "/path/to/javascript/specialCharacters.js")
  
  document.querySelector("head").appendChild(fileRef);
}

special-character-input's People

Contributors

dersmon avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

special-character-input's Issues

Chinesisch: Use Case und Zielgruppe?

Was soll bei Chinesisch der Use Case und die Zielgruppe sein? Jeder, der Chinesisch lesen kann, hat auch ein Eingabe-System (IME) installiert/aktiviert.

Die Zeichenliste ist zurzeit einfach ein Stück eines besonders harmlosen Bereichs von chinesischen Zeichen in Unicode (CJK Unified Ideographs), und dann alle hintereinander weg. Insbesondere nichts jenseits von U+FFFF, wo es beginnt interessant zu werden, ob Systeme damit umgehen können. Und selbst wenn man nur mit diesen paar Zeichen schreiben will, ist das nicht praktisch. Soll man sich der Unicode-Nicht-Reihenfolge nach durch die Tafeln blättern?

Das Widget wird außerdem unten abgeschnitten.

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.