Recent Topics

[Today at 02:21:14 AM]

[Today at 01:43:19 AM]

[October 22, 2019, 07:57:57 PM]

[October 22, 2019, 06:16:43 PM]

[October 22, 2019, 03:41:17 PM]

[October 22, 2019, 03:16:44 PM]

[October 22, 2019, 12:33:43 PM]

[October 22, 2019, 12:27:07 PM]

[October 22, 2019, 06:23:18 AM]

[October 22, 2019, 01:21:48 AM]

[October 22, 2019, 12:58:15 AM]

[October 21, 2019, 01:23:28 PM]

[October 21, 2019, 02:56:43 AM]

[October 19, 2019, 09:44:35 AM]

[October 16, 2019, 06:00:56 PM]

[October 16, 2019, 05:21:14 PM]

[October 16, 2019, 05:18:07 PM]

[October 16, 2019, 05:16:01 PM]

[October 16, 2019, 05:09:19 PM]

[October 15, 2019, 06:13:46 AM]

[October 15, 2019, 02:36:49 AM]

[October 12, 2019, 03:21:40 AM]

[October 10, 2019, 10:55:16 AM]

[October 09, 2019, 03:55:44 PM]

[October 09, 2019, 12:00:44 PM]

[October 07, 2019, 01:19:41 PM]

[October 07, 2019, 09:16:21 AM]

[October 07, 2019, 09:01:58 AM]

Talkbox

2019 Oct 23 00:59:07
Johann: Sadhu (but please penetrate form fist, not nice to become a tree)

2019 Oct 22 22:30:35
Varado: May all beings realise the cessation of perception that leads to liberation

2019 Oct 22 14:05:14
Cheav Villa:  _/\_ _/\_ _/\_

2019 Oct 22 11:44:21
Johann: "eko care": the real, the highest eco care, climate protection

2019 Oct 21 13:53:58
Johann: eko care!

2019 Oct 21 13:10:14
Moritz: Chom reap leah _/\_ May all spend a good uposatha day. _/\_ _/\_ _/\_

2019 Oct 21 12:13:15
Johann: Meister Moritz

2019 Oct 21 12:12:45
Moritz: Bong Villa _/\_

2019 Oct 21 12:12:40
Moritz: Vandami Bhante _/\_

2019 Oct 21 11:10:14
Cheav Villa: Kana Bhante _/\_ _/\_ _/\_ Kana got the email _/\_ _/\_ _/\_

2019 Oct 21 06:14:10
Khemakumara: Sadhu and mudita _/\_ _/\_ _/\_

2019 Oct 21 04:24:03
Cheav Villa: Sadhu Sadhu  _/\_ _/\_ _/\_

2019 Oct 21 04:00:46
Johann: May all spend a meritful Siladay today

2019 Oct 20 11:27:41
Varado: I pay respects to the Venerable Indaññāno and the Noble Sangha. May you please consider me a Sanghamitta.

2019 Oct 20 11:17:39
Varado: I pay respects to Venerable Indaññāno.

2019 Oct 17 12:06:02
Moritz: Chom reap leah _/\_ May all have a kusala day _/\_ _/\_ _/\_

2019 Oct 17 11:51:37
Moritz: Bong Villa :) _/\_

2019 Oct 17 11:51:25
Moritz: Vandami Bhante Varado _/\_ _/\_ _/\_

2019 Oct 17 11:50:47
Cheav Villa: Vandami Bhante :) _/\_ _/\_ _/\_

2019 Oct 17 11:50:25
Moritz: Vandami Bhante Johann _/\_ _/\_ _/\_

2019 Oct 17 11:48:30
Johann: Nyom Moritz

2019 Oct 17 11:45:08
Johann: Nyom Villa

2019 Oct 17 11:44:00
Cheav Villa: Chum reap sur Master Moritz :D _/\_

2019 Oct 16 03:29:01
Cheav Villa: Vandami Bhante Ariyadhammika  _/\_ _/\_ _/\_

2019 Oct 15 15:28:14
Cheav Villa:  _/\_ _/\_ _/\_

2019 Oct 15 14:56:50
Johann: Nyom Villa said: May Brah Ang recover fast. May Oncle Chanroth recover fastl as well.

2019 Oct 15 14:49:29
Cheav Villa: សូមអោយពូចាន់រ័ត្មឆាប់ជាពីជម្ងឺដែរ   :D _/\_

2019 Oct 15 14:48:46
Cheav Villa: សូមអោយព្រះអង្គឆាប់ជាពីជម្ងឺ _/\_  _/\_ _/\_

2019 Oct 15 14:14:23
Johann: Chanroth said: At times Brah Ang has ābādhi (illness), I am also sick.

2019 Oct 15 13:24:21
Chanroth: ពេលព្រះអង្គមានអាពាធិ ខ្ញុំមានជំម្ងឺដែរ _/\_  _/\_ _/\_

2019 Oct 14 10:22:27
Cheav Villa: Bhante Varado  _/\_ _/\_ _/\_

2019 Oct 13 04:44:10
Cheav Villa:  _/\_ _/\_ _/\_

2019 Oct 13 01:17:17
Johann: Sadhu

2019 Oct 13 01:15:59
Khemakumara: May every living being in all realms be free from ever illness, free from danger, free from animosity and free from oppression.

2019 Oct 13 00:50:55
Khemakumara: may it be a path-and fruitful Uposatha Day

2019 Oct 12 15:40:31
Cheav Villa: May Bhante soon recover from malaria  _/\_ _/\_ _/\_

2019 Oct 12 13:47:46
Varado:  _/\_ _/\_ _/\_

2019 Oct 11 16:35:52
Cheav Villa:  _/\_ _/\_ _/\_

2019 Oct 10 10:55:45
Khemakumara: Nyom Cheav Villa

2019 Oct 10 10:54:11
Cheav Villa:  _/\_ _/\_ _/\_

2019 Oct 10 05:11:04
Khemakumara: _/\_ _/\_ _/\_ Bhante

2019 Oct 08 15:01:04
Vithou:  _/\_

2019 Oct 07 07:39:21
Johann: Good to hear

2019 Oct 07 05:48:11
Khemakumara: _/\_ _/\_ _/\_ Kana Bhante. may kana trust, that  prah  karuṇā dwells in kusalā  conditions in and outwardly.

2019 Oct 07 05:09:34
Johann: Bhante. All health and relaying on good outwardly and inwardly conditions?

2019 Oct 07 04:20:19
Khemakumara: _/\_ _/\_ _/\_ Bhante

2019 Oct 06 06:44:19
Cheav Villa:  _/\_ _/\_ _/\_

2019 Oct 06 06:24:49
Johann: Sadhu

2019 Oct 06 04:48:36
Khemakumara: something to give (in)? Today is waxing moon Uposatha! May it be a path- and fruitful give (in) day!

2019 Oct 06 04:37:01
Khemakumara:  *gift*

2019 Oct 02 16:38:31
Cheav Villa:  _/\_  _/\_ _/\_

2019 Oct 02 12:27:40
Khemakumara: Sadhu and mudita

2019 Oct 02 12:06:36
Johann: (U.Chanroth wrote in mudita: Today Buddhaparisada arrived at Ashram Thmo Duk)

2019 Oct 02 08:31:08
Chanroth: ថ្ងៃនេះពុទ្ធបរិស័ទ្ទមកដល់អាស្រមថ្មទូក _/\_ _/\_ _/\_

2019 Sep 30 06:49:48
Cheav Villa: Vandami Bhante  _/\_ _/\_ _/\_

2019 Sep 30 06:15:26
Johann: Nyom Villa

2019 Sep 29 05:35:53
Cheav Villa:  _/\_ _/\_ _/\_

2019 Sep 28 06:56:38
Johann: Nyom Chanroth wrote: "Natthi santi paraṃ sokhaṃ" No happiness higher then that of peace.

2019 Sep 28 04:22:03
Chanroth: នត្ថិ សន្តិ បរំ សុខំ

2019 Sep 28 04:06:00
Chanroth:   _/\_ _/\_ _/\_

2019 Sep 28 01:57:20
Khemakumara: _/\_ _/\_ _/\_

2019 Sep 28 01:40:27
Johann: A blessed and virtuous new-moon Uposata for those holding it today.

2019 Sep 26 01:28:41
Johann: Bhante

2019 Sep 26 01:17:26
Khemakumara: _/\_ _/\_ _/\_ Bhante

2019 Sep 23 05:39:08
Khemakumara:  _/\_ _/\_ _/\_

2019 Sep 23 05:24:36
Johann: Bhante, Bhante

2019 Sep 22 18:47:42
Johann: Kana needs to leave now for possible tomorrow again, Bhante. Much dhammic joy in further exploring here within. and a blessed halfmoon day.

2019 Sep 22 16:41:02
Johann: _/\_ Bhante Varado (batterie of mine will be off soon, just to inform)

2019 Sep 22 07:28:15
Johann: Sadhu

2019 Sep 22 03:26:27
Cheav Villa:  _/\_ _/\_ _/\_

2019 Sep 22 02:48:14
Khemakumara: may it be a path-and fruitful Uposatha Day

2019 Sep 22 02:48:14
Khemakumara: may it be a path-and fruitful Uposatha Day

2019 Sep 21 23:53:54
Vithou:  _/\_

2019 Sep 21 13:36:07
Cheav Villa:  _/\_ _/\_ _/\_

2019 Sep 21 09:37:51
Johann: A blessed and meritful Sila-day those who keep it today.

2019 Sep 20 07:29:23
Johann:  _/\_ Bhante Varado

2019 Sep 19 14:52:03
Johann: Bhante

2019 Sep 19 14:36:44
Khemakumara: Nyom saddhamma

2019 Sep 19 14:35:55
Khemakumara: _/\_ _/\_ _/\_ Bhante

2019 Sep 19 09:58:15
Cheav Villa:  _/\_ _/\_ _/\_ Bhante

2019 Sep 19 04:31:27
Khemakumara: Nyom Cheav Villa

2019 Sep 19 01:47:48
Khemakumara: _/\_ _/\_ _/\_ Bhante

2019 Sep 18 16:44:10
Johann:  _/\_ Bhante Ariyadhammika

2019 Sep 18 06:35:53
Khemakumara:  _/\_ _/\_ _/\_ Kana, Bhante and kana are well!

2019 Sep 18 06:32:01
Johann: Bhante  _/\_ Is he and Bhante well?

2019 Sep 18 04:25:43
Khemakumara: _/\_ _/\_ _/\_ Bhante

2019 Sep 18 04:10:57
Johann: Nyom Villa.

2019 Sep 18 02:48:47
Cheav Villa: Welcome, upasaka sadhamma _/\_

2019 Sep 18 02:47:31
Cheav Villa: Master Moritz _/\_

2019 Sep 18 02:47:15
Cheav Villa: Vandami Bhante _/\_ _/\_ _/\_

2019 Sep 18 01:59:53
Moritz: Good night _/\_

2019 Sep 18 01:59:44
Moritz: _/\_ Bong Villa

2019 Sep 18 01:41:47
Johann: Nyom Moritz

2019 Sep 18 01:30:08
Moritz: Welcome, upasaka sadhamma _/\_

2019 Sep 18 01:29:43
Moritz: Vandami Bhante _/\_ _/\_ _/\_

2019 Sep 14 01:20:37
Johann: (no problem at all) A blessed and meritful conducted Uposatha those observing it today.

2019 Sep 13 16:07:47
Cheav Villa: សុំទោស _/\_

2019 Sep 13 16:06:36
Cheav Villa:  _/\_

2019 Sep 13 15:53:17
Cheav Villa: Vandami Bhante _/\_ _/\_ _/\_ Bhante Varado _/\_ _/\_ _/\_

2019 Sep 13 15:51:32
Johann:  _/\_ Bante Varado. Nyom Morotz, Nyom Villa.

Tipitaka Khmer

 Please feel welcome to join the transcription project of the Tipitaka translation in khmer, and share one of your favorite Sutta or more. Simply click here or visit the Forum: 

Search ATI on ZzE

Zugang zur Einsicht - Schriften aus der Theravada Tradition



Access to Insight / Zugang zur Einsicht: Dhamma-Suche auf mehr als 4000 Webseiten (deutsch / english) - ohne zu googeln, andere Ressourcen zu nehmen, weltliche Verpflichtungen einzugehen. Sie sind für den Zugang zur Einsicht herzlich eingeladen diese Möglichkeit zu nutzen. (Info)

Random Sutta
Random Article
Random Jataka

Zufälliges Sutta
Zufälliger Artikel
Zufälliges Jataka


Arbeits/Work Forum ZzE

"Dhammatalks.org":
[logo dhammatalks.org]
Random Talk
[pic 30]

Dear Visitor!

Herzlich Willkommen auf sangham.net! Welcome to sangham.net!
Ehrenwerter Gast, fühlen sie sich willkommen!

Sie können sich gerne auch unangemeldet an jeder Diskussion beteiligen und eine Antwort posten. Auch ist es Ihnen möglich, ein Post oder ein Thema an die Moderatoren zu melden, sei es nun, um ein Lob auszusprechen oder um zu tadeln. Beides ist willkommen, wenn es gut gemeint und umsichtig ist. Lesen Sie mehr dazu im Beitrag: Melden/Kommentieren von Postings für Gäste
Sie können sich aber auch jederzeit anmelden oder sich via Email einladen und anmelden lassen oder als "Visitor" einloggen, und damit stehen Ihnen noch viel mehr Möglichkeiten frei. Nutzen Sie auch die Möglichkeit einen Segen auszusprechen oder ein Räucherstäbchen anzuzünden und wir freuen uns, wenn Sie sich auch als Besucher kurz vorstellen oder Hallo sagen .
Wir wünschen viel Freude beim Nutzen und Entdecken des Forums mit all seinen nützlichen Möglichkeiten .
 
Wählen Sie Ihre bevorzugte Sprache rechts oben neben dem Suchfenster.

Wähle Sprache / Choose Language / เลือก ภาษา / ជ្រើសយកភាសា: ^ ^
 Venerated Visitor, feel heartily welcome!
You are able to participate in discussions and post even without registration. You are also able to report a post or topic to the moderators, may it be praise or a rebuke. Both is welcome if it is meant with good will and care. Read more about it within the post: Report/comment posts for guests
But you can also register any time or get invited and registered in the way to request via Email , or log in as "Visitor". If you are logged in you will have more additional possibilities. Please feel free to use the possibility to  give a blessing or light an incent stick and we are honored if you introduce yourself or say "Hello" even if you are on a short visit.
We wish you much joy in using and exploring the forum with all its useful possibilities  
Choose your preferred language on the right top corner next to the search window!

Zugang zur Einsicht - Übersetzung, Kritik und Anmerkungen

Herzlich Willkommen im Arbeitsforum von zugangzureinsicht.org im Onlinekloster sangham.net!


Danke werte(r) Besucher(in), dass Sie von dieser Möglichkeit Gebrauch machen und sich direkt einbringen wollen.

Unten (wenn Sie etwas scrollen) finden Sie eine Eingabemaske, in der Sie Ihre Eingabe einbringen können. Es stehen Ihnen auch verschiedene Gestaltungsmöglichkeiten zur Verfügung. Wenn Sie einen Text im formatierten Format abspeichern wollen, klicken Sie bitte das kleine Kästchen mit dem Pfeil.

Die Textfelder "Name" und "email" müssen ausgefüllt werden, Sie können hier aber auch eine Anonyme Angabe machen und eine Pseudo-email angeben (geben Sie, wenn Sie Rückantwort haben wollen, jedoch einen Kontakt an), wenn Ihnen das unangenehm ist. Der Name scheint im Forum als Text auf und die Email ist von niemanden außer dem Administrator einsehbar.

Wenn Sie den Text fertig geschrieben haben, müssen Sie noch den Spamschutz überwinden, das Bild zusammen setzen, und dann auf "Vorschau" oder "Senden" drücken, wenn für Sie alles passt.

Wenn Sie eine Spende einer Übersetzung machen wollen, wäre es schön, wenn Sie etwas vom Entstehen bzw. deren Herkunft erzählen und Ihrer Gabe vielleicht noch eine Widmung anhängen.

Gerne, so es möglich ist, werden wir Ihre Übersetzung dann auch den Seiten von Zugang zur Einsicht veröffentlichen. Für generelle Fragen zu dem Umfang der Dhamma-Geschenke auf ZzE sehen Sie bitte in den FAQ von ZzE ein.

Gerne empfangen wir Kritik und selbstverständlich auch Korrekturen oder Anregungen hier. Es steht Ihnen natürlich offen und Sie sind dazu herzlich eingeladen auch direkt mit einem eigenen Zugang hier an den Arbeiten vielleicht direkt teilzunehmen.

Sadhu!

metta & mudita
Ihr Zugang zur Einsicht Team

Um sich im Abeitsforum etwas unzusehen, klicken Sie hier. . Sie finden hier viele Informationen und vielleicht sogar neues rund um Zugang zur Einsicht.

Author Topic: [ati] Possibility to display of "zero width space" and other unicode characters  (Read 4669 times)

0 Members and 1 Guest are viewing this topic.

Online Johann

  • Samanera
  • Very Engaged Member
  • *
  • Sadhu! or +366/-0
  • Gender: Male
  • Date of ordination/Datum der Ordination.: 20140527
Writing in Khmer without the use of zero white spaces is not very good, yet less editors and programs would allow to show them.

Are there possibilities to let them be shown in ati-editor and on the compare- page?

A topic was raised in DW-Forum as well: Display of "zero width space" and other unicode characters
« Last Edit: February 11, 2019, 07:13:56 AM by Johann »
This post and Content has come to be by Dhamma-Dana and so is given as it       Dhamma-Dana: Johann

Offline Moritz

  • Cief houskeeper / Chefhausmeister
  • Very Engaged Member
  • *
  • Sadhu! or +255/-0
  • Gender: Male
Just tried and added a button to the editor toolbar to switch on displaying zero-white-space characters. (See screenshot attached for how it look on a big desktop screen.)

It is a very hacky solution, and currently only working on a large screen. There is no way to directly render zero-width characters in HTML, so one has to indirectly copy/calculate the text layout and display marks in the right spots, which is very slow for large texts with many zero-whitespaces.

Tested for http://accesstoinsight.eu/km/tipitaka/book_053?do=edit on my desktop computer, it takes at least fifteen seconds here, after clicking the new button, before the browser becomes responsive again shows the blue marks. And when changing the text, one has to wait again, because the display of the white-space marks has to be calculated for the whole text with every change.

For very small texts it seems to work conveniently on my computer. But after some ten thousand characters, and especially with many zero whitespaces it becomes very slow quickly.

On Android smartphone (and probably any smaller screen), the layout is currently not usable at all, showing everything completely wrong.

Maybe possible to find some optimizations with time.

Online Johann

  • Samanera
  • Very Engaged Member
  • *
  • Sadhu! or +366/-0
  • Gender: Male
  • Date of ordination/Datum der Ordination.: 20140527
Sadhu

(works as told and runs strange if zooming)

Atma came "CSS @font-face Rule", with which certain unicode-range can be addressed, to mind. Not sure if such as background or styling can be addressed with it.

   unicode-range    Optional. Defines the range of unicode characters the font supports. Default value is "U+0-10FFFF"

An idea came here to mind: what if there is a 'special' "white space font" wherein the zero width space is a slight box with a small point.

The "tool" then "simply" switches to another font which has the character not with a zero width and possible a small sign to recognize.

Or even generally using a font that is available at ati.eu server for the editor, editor friendly and Khmer-font friendly (incl. size, distances of lines... for certain character ranges).
« Last Edit: April 02, 2019, 06:46:34 AM by Johann »
This post and Content has come to be by Dhamma-Dana and so is given as it       Dhamma-Dana: Johann

Offline Moritz

  • Cief houskeeper / Chefhausmeister
  • Very Engaged Member
  • *
  • Sadhu! or +255/-0
  • Gender: Male
An idea came here to mind: what if there is a 'special' "white space font" wherein the zero width space is a slight box with a small point.

The "tool" then "simply" switches to another font which has the character not with a zero width and possible a small sign to recognize.

That sounds like the most straightforward way if something like that is possible.
Not familiar with editing fonts and how they are actually stored, somehow I have doubts that it could be so clean and "easy", I will try to find out what is possible and impossible. Sadhu!

_/\_

Online Johann

  • Samanera
  • Very Engaged Member
  • *
  • Sadhu! or +366/-0
  • Gender: Male
  • Date of ordination/Datum der Ordination.: 20140527
They are often ttf-files, usually they are stored anywhere on certain server but can also stored on the own (at least if allowed by the creater, Atma did such for the Pali-Khmer script, called by "div cs-km"). There are certain programs, like grafic programs where one can desighn each character. There is of cource certain new knowledge needed and a punsh of "new" words and funcutions in detail but possible not that huge for simply make enlarge the zws to a small space and draw a point. Yet a given front is needed which also covers all scripts.

Maybe Nyom Nathan ( sungkhum ) , much infolved in the matter, knowing also designer) feels inspired to help that a script might be remorseless useable for the Sangha and has possible friends helping also with a "zero width space font". Not sure how libre office, for excample, managed the display.

Years ago my person "loved" drawing and scripts design, but it's truly not really proper anymore to engage much here but let others do merits instead. Surely a wonderful area for such, given that the Sangha has actually not even scripts to use, given.
« Last Edit: April 03, 2019, 01:45:47 AM by Johann »
This post and Content has come to be by Dhamma-Dana and so is given as it       Dhamma-Dana: Johann

Offline Moritz

  • Cief houskeeper / Chefhausmeister
  • Very Engaged Member
  • *
  • Sadhu! or +255/-0
  • Gender: Male
Sadhu. I was aware of the various file extensions, but not how they are stored inside, and especially if it is really possible to make visible glyphs for invisible space or even other "control characters" (like line break etc.).

After some searching and trying, although no definite answer , I found that it is apparently impossible to just insert a glyph for zero whitespace that would then show up in HTML or text editors:
Note that many programs manage their whitespace themselves and, e.g., only use the width of the font’s space character. ...
With font editors, such as FontForge, one can create and assign such glyphs to any code point, including zero white-space (u200b) etc. But they are then not displayed in web browsers, or most editors, because most softwares just have their standard way of treating these special invisible characters without even looking if a glyph is defined in the font for them. Tried to make a glyph for zero white-space but it is simply not rendered.

However, as a workaround, one can just use another Unicode code point (from the Unicode "Private Use Area" which are not assigned to anything by the standard) instead of zero-whitespace, for which one can then define a glyph, and simply replace all zero-whitespace with that other code point during editing, and replace it back before saving. This would still require some JavaScript, but much simpler with no complicated calculation involved so that it would not slow down much or display garbage.

Some changes to the DokuWiki inner PHP code are needed, which is structured a bit complicated and confusing to me. So it may take some time to figure all out that is necessary.
At some point this evening I may be editing the necessary code on the server, so editing things may look strange or not work for a short time.
* Edit: Not really capable doing this anymore for today.

_/\_
« Last Edit: April 03, 2019, 09:08:23 PM by Moritz »

Online Johann

  • Samanera
  • Very Engaged Member
  • *
  • Sadhu! or +366/-0
  • Gender: Male
  • Date of ordination/Datum der Ordination.: 20140527
Understandable, also that zwsp has been treated alien in programming.

Not sure if such helps if building on an editor like https://www.dokuwiki.org/plugin:codemirror
This post and Content has come to be by Dhamma-Dana and so is given as it       Dhamma-Dana: Johann

Offline Moritz

  • Cief houskeeper / Chefhausmeister
  • Very Engaged Member
  • *
  • Sadhu! or +255/-0
  • Gender: Male
Sadhu, yes. Probably best to do it as a plugin, for which the CodeMirror plugin is useful as an example, instead of butchering internal DokuWiki code.

Still needs some time to figure things out.
_/\_

Online Johann

  • Samanera
  • Very Engaged Member
  • *
  • Sadhu! or +366/-0
  • Gender: Male
  • Date of ordination/Datum der Ordination.: 20140527
Just to let it be know (Atma thinks that it's know, but to do not forget at time then): the css wiki... might "confuse" the z-position, not only making a gray area on the left of the box but also getting the scroll area above the edit and menu section right of the text.

Atma made Nyoms effort and undertaking a little bit known: A "showing invisible character editor plugin"

Mr Myron has developed a key board plugin, which (others then the most mobile keyb can type zwsp and has all characters included) does not require much issues for the writer online then as well: https://www.dokuwiki.org/plugin:vkeyboard if thinking that such is useful.
« Last Edit: April 07, 2019, 11:24:35 AM by Johann »
This post and Content has come to be by Dhamma-Dana and so is given as it       Dhamma-Dana: Johann

Offline Moritz

  • Cief houskeeper / Chefhausmeister
  • Very Engaged Member
  • *
  • Sadhu! or +255/-0
  • Gender: Male
_/\_ _/\_ _/\_



The zero white-space plugin should now be working (all files contained in lib/plugins/zws), displaying zero whitespace in the text editing area and on the revision comparison page:


There is a button to insert a zws at the current position in the text:

Otherwise no changes in user interface.


The way it works is like this:

There is a font (lib/plugins/zws/zws2.ttf) with only one character, for the unicode code point E000 (written as '\ue000' in JavaScript and PHP), because a character for the actual ZWS code point 200B ('\u200b') would not be displayed in browsers.

This font is referenced in lib/plugins/zws/zws.css and applied only to the text editing area and the revision comparison table. (It does not matter that the font has only a symbol for one character. All other characters will be displayed by the next fonts on the "chain".)

During editing of a page, all ZWS characters are replaced by the placeholder E000, which is displayed by the font. When saving, the E000 character is replaced again by 200B (normal ZWS).


Very simple on principle, but some tricks were needed, because browser APIs are sometimes complicated when dealing with unusual cases.
So I hope that everything really works now. Feedback is of course very welcome.

 *sgift*




Some possible improvements:

Maybe the ZWS placeholder could be thicker? (Would be quick and easy.) Maybe colored? (Not sure how to make fonts that are colored by default. I think it is possible somehow.)

Maybe a button to turn ZWS display on and off? For now, it is always turned on (in the editor). Maybe somewhere on the normal page UI, a switch to use the ZWS font everywhere when reading would be good, but might need some tricks again.

_/\_ _/\_ _/\_

Online Johann

  • Samanera
  • Very Engaged Member
  • *
  • Sadhu! or +366/-0
  • Gender: Male
  • Date of ordination/Datum der Ordination.: 20140527
Sadhu, Sadhu
This post and Content has come to be by Dhamma-Dana and so is given as it       Dhamma-Dana: Johann

Online Johann

  • Samanera
  • Very Engaged Member
  • *
  • Sadhu! or +366/-0
  • Gender: Male
  • Date of ordination/Datum der Ordination.: 20140527
My person did not experiment much till now (thought of how would it insert copied text including zwsp) but came across that when copy form one editor window to another it seems that it suppresses line breaks (better replace with a white space).

Copy:


past:


Copy it here, it seems to come from the source and does not happen in the moment of past:

Code: [Select]
==== 1. Kimilasuttaṃ ==== <span sang_id #{file-}.{no}>[[{path-release}:{file-}.{no}|{file-}.{no}]] | [[{path-source}:{file}#{file-}.{no}|source]]</span>
This post and Content has come to be by Dhamma-Dana and so is given as it       Dhamma-Dana: Johann

Offline Moritz

  • Cief houskeeper / Chefhausmeister
  • Very Engaged Member
  • *
  • Sadhu! or +255/-0
  • Gender: Male
I see. I think it should be fixed now. (Maybe needing to clear cache by adding "&purge=true" to the URL, possibly also helpful to open and refresh the CSS and JS files http://accesstoinsight.eu/lib/plugins/zws/zws.css and http://accesstoinsight.eu/lib/plugins/zws/zws.js so that they are refreshed in browser cache).

I had wanted to automatically replace the placeholder with ZWS when copying from the editor. So that it would be a real ZWS when pasting somewhere else again. But it seems that this modification also removed the line breaks and I see no way to make it work like intended. So it has to work without this convenience for now.

On the other hand, when inserting text into the editor, ZWS characters will be automatically replaced with the visible placeholder, and this should still work as intended. (But it is not possible to do "undo" after such a paste, if there were zero-width characters in it that were replaced.)

_/\_

* Moritz hoping that it now really works after hudling to fix it, might not be much available in the next days

*  Edit: Oops, something again not working right: Now ZWS is not replaced in the text loaded from the server. Hope I can quickly make it work. Should work now.
« Last Edit: April 18, 2019, 05:31:13 PM by Moritz »

Online Johann

  • Samanera
  • Very Engaged Member
  • *
  • Sadhu! or +366/-0
  • Gender: Male
  • Date of ordination/Datum der Ordination.: 20140527
Sadhu

The first test showed that text copied into the editor would be rendered in regard of certain html characters and what ever content is in the editor, can not be copied anywhere else.

http://accesstoinsight.eu/user/johann/test




The second test, after having called the posted links, shows that the renderings of special characters also become part of the displayed text.

http://accesstoinsight.eu/user/johann/test1



Atma is a little bit "scared" to open any page for now. Which seems to be good, since it obviously converts the text, having downloaded the file after saving:

Code: [Select]
==== សុន្ទរសមុទ្ទត្ថេរ ====

&lt;span sang_id #sut.kn.tha.07.01&gt;[[km:tipitaka:sut:kn:tha:sut.kn.tha.07.01|sut.kn.tha.07.01]] | [[km:tipitaka:book_057#sut.kn.tha.07.01|book_057]]&lt;/span&gt;



&lt;div centeralign&gt;**(១. សុន្ទរសមុទ្ទត្ថេរគាថា)**&lt;/div&gt;



&lt;span para #para_225&gt;[២២៥]&lt;/span&gt; ស្រីផ្កាមាស​តាក់​តែង ស្លៀក​ពាក់​ល្អ ទ្រទ្រង់​កម្រងផ្កា ស្អិតស្អាង​ហើយ មាន​ជើង​ស្រឡាប​ដោយ​ទឹក​ល័ខ ពាក់​ស្បែក​ជើង លុះ​ដោះ​ស្បែក​ជើង​ចេញ​ហើយ ក៏​ធ្វើ​អញ្ជលី​ចំពោះ​មុខ ស្រីផ្កាមាស​នោះ និយាយ​នូវ​ពាក្យ​ជា​ប្រធាន​នៃ​មិត្ត((ពាក្យ​ចែចង់។)) នឹង​ខ្ញុំ ដោយ​សំដី​ដ៏​ទន់​ពីរោះ​ថា លោក​នៅ​កំឡោះ​ហើយ​បួស លោក​ចូរ​ឋិត​នៅ​ក្នុង​ពាក្យ​ប្រដៅ​របស់​ខ្ញុំ លោក​ចូរ​បរិភោគ​កាម​ជា​របស់​មនុស្ស​ចុះ ខ្ញុំ​នឹង​ឲ្យ​សម្បត្តិ​ដ៏​ពេញ​ចិត្ត​ដល់​លោក។ ខ្ញុំ​បេ្តជ្ញា​ពាក្យ​ពិត​ដល់​លោក ឬ​នឹង​នាំ​ភ្លើង​ដល់​លោក។((ស្បថ​នឹង​ភ្លើង)) កាល​ណា​យើង​ទាំង​ពីរ​នាក់ ជា​មនុស្សចាស់​កាន់​ឈើច្រត់​ហើយ យើង​នឹង​បួស​ទាំង​ពីរ​នាក់ នឹង​កាន់​យក​នូវ​ជ័យជំនះ​ក្នុង​លោក​ទាំង​ពីរ។ ខ្ញុំ​បាន​ឃើញ​ស្រីផ្កាមាស​នោះ មក​ធ្វើ​អញ្ជលី តាក់​តែង ស្លៀក​ពាក់​ល្អ ដូច​ជា​ជាប់​អន្ទាក់​មច្ចុ លំដាប់​នុ៎ះ ខ្ញុំ​ក៏​បាន​ធ្វើ​ទុក​ក្នុង​ចិត្ត​ដោយ​ឧបាយ​​នៃ​បញ្ញា។បេ។((គប្បី​មើល​ក្នុង​ចតុក្កនិបាត។))

&lt;div rightalign&gt;សុន្ទរសមុទ្ទត្ថេរ។&lt;/div&gt;



==== លកុណ្តកត្ថេរ ====

&lt;span sang_id #sut.kn.tha.07.02&gt;[[km:tipitaka:sut:kn:tha:sut.kn.tha.07.02|sut.kn.tha.07.02]] | [[km:tipitaka:book_057#sut.kn.tha.07.02|book_057]]&lt;/span&gt;


It also seems to convert into CRLF line breaks.

Don't open any page in the editor and save the content for now!

It seems that the script also adds zwsp next to the html-value of certain characters.



If having less time and much in hurry, maybe it's good and possible to disable the modification meanwhile.
« Last Edit: April 19, 2019, 06:24:33 AM by Johann »
This post and Content has come to be by Dhamma-Dana and so is given as it       Dhamma-Dana: Johann

Offline Moritz

  • Cief houskeeper / Chefhausmeister
  • Very Engaged Member
  • *
  • Sadhu! or +255/-0
  • Gender: Male
Vandami Bhante _/\_

That comes from hudling.

*  Oh... I just notice, when clicking the "<.I.>" smiley here in the forum post editor, it inserts "&lt;.I.&gt;", instead of <.I.>. Must be a similar problem...   ^-^

Now I am confident everything should really be fixed. Sorry for any troubles. But at least nothing could have been lost, with old versions being kept in revision history.


Problem 1: inserting &gt; instead of > etc. happened during loading of the text for editing (in /lib/plugins/zws/action.php on line 86 at the time of this writing, applying formText function to the text, which DokuWiki applies afterwards another time, so it was done twice [converting into &lt; etc. for display is necessary but should happen only one time]). Is now fixed.

Problem 2: Not being able to copy from the editor, was leftover from the previous attempt of using contenteditable instead of textarea, using a method that does not work with textarea (in zws.js, lines 64-72 at the time of this writing). Is now fixed (only using standard copy now without modifications).

Problem 3:
Quote
It also seems to convert into CRLF line breaks.
Must have been the same cause as the first problem.

Problem 4:
Quote
It seems that the script also adds zwsp next to the html-value of certain characters.
Must have been the same cause as the first problem.


All this should now work. I don't think it is necessary to disable modification. Old versions will remain in history and can be restored in case that really still something is wrong. And nothing really dangerous would happen.

_/\_
« Last Edit: April 19, 2019, 06:53:01 AM by Moritz »

Tags: