Recent Topics

[April 19, 2019, 06:39:50 PM]

[April 19, 2019, 06:53:43 AM]

[April 18, 2019, 04:01:57 PM]

[April 18, 2019, 02:22:14 AM]

[April 17, 2019, 11:15:34 PM]

[April 14, 2019, 01:04:23 PM]

[April 13, 2019, 05:11:01 PM]

[April 13, 2019, 08:20:39 AM]

[April 13, 2019, 04:17:38 AM]

[April 12, 2019, 02:10:10 PM]

[April 11, 2019, 12:38:23 PM]

[April 10, 2019, 11:05:15 AM]

[April 10, 2019, 08:55:52 AM]

[April 09, 2019, 03:33:44 PM]

[April 07, 2019, 04:51:51 PM]

[April 07, 2019, 01:23:59 AM]

[April 07, 2019, 01:15:02 AM]

[April 05, 2019, 03:46:39 PM]

[April 04, 2019, 10:08:52 AM]

[April 03, 2019, 02:18:53 AM]

[April 02, 2019, 03:35:05 PM]

[April 02, 2019, 09:09:52 AM]

[April 01, 2019, 07:08:32 PM]

[April 01, 2019, 05:11:35 PM]

[April 01, 2019, 11:26:10 AM]

[April 01, 2019, 04:56:40 AM]

[March 30, 2019, 12:43:51 AM]

[March 29, 2019, 01:45:50 PM]

Talkbox

2019 Apr 19 06:30:18
Cheav Villa:  _/\_

2019 Apr 19 06:25:58
Moritz: _/\_ bong Villa

2019 Apr 19 06:25:48
Moritz: _/\_ _/\_ _/\_ Bhante

2019 Apr 19 02:23:14
Cheav Villa:  សាធុ​ៗ  _/\_ _/\_ _/\_

2019 Apr 19 01:42:18
Johann: Another fullmoon, another chance. It's not sure that breaking apart will make it the last. May all spend a auspicious Uposatha.

2019 Apr 17 15:33:54
Chanroth:  _/\_ bong Moritz

2019 Apr 17 15:32:22
Chanroth:  _/\_bong villa

2019 Apr 17 15:31:07
Chanroth:  _/\_ _/\_ _/\_

2019 Apr 17 07:11:18
Johann: Bhante

2019 Apr 17 05:05:51
Johann: Bhante  _/\_

2019 Apr 17 02:16:55
Johann: May all bring some merits left into this new year for them!

2019 Apr 12 17:30:17
Cheav Villa:  _/\_ _/\_ _/\_

2019 Apr 12 14:39:05
Johann: Nyom Moritz, Nyom Villa

2019 Apr 12 14:27:27
Cheav Villa:  _/\_  Master Moritz

2019 Apr 12 14:26:24
Moritz: _/\_ Bong Villa

2019 Apr 12 14:26:12
Moritz: _/\_ _/\_ _/\_ Bhante

2019 Apr 12 14:09:15
Cheav Villa:  _/\_ _/\_ _/\_

2019 Apr 12 01:54:32
Johann: A meritful Sila-day and much rightly joy by doing merits.

2019 Apr 09 08:24:39
Johann: Meister Moritz

2019 Apr 09 08:14:00
Moritz: _/\_ _/\_ _/\_ Bhante

2019 Apr 06 19:12:07
Moritz: Vandami, Bhante _/\_

2019 Apr 06 08:32:11
Khemakumara:  _/\_ _/\_ _/\_

2019 Apr 06 07:44:05
Johann: _/\_ Bhante Indannano, Bhante Khemakumara

2019 Apr 06 06:51:05
Cheav Villa:  _/\_ _/\_ _/\_

2019 Apr 05 14:37:22
Khemakumara: Nyom Roman

2019 Apr 05 14:35:22
Johann: Bhante, Meister Roman

2019 Apr 05 14:18:13
Khemakumara:  _/\_ _/\_ _/\_ Bhante

2019 Apr 05 09:58:10
Khemakumara: Nyom Cheav Villa

2019 Apr 05 09:55:43
Cheav Villa:  _/\_ _/\_ _/\_

2019 Apr 05 09:53:07
Khemakumara: Nyom Moritz

2019 Apr 05 07:23:13
Moritz: Vandami Bhante _/\_

2019 Apr 05 05:41:00
Johann: Nyom Villa

2019 Apr 04 02:43:01
Johann: May all spend a meritful old month over New month birth day this day.

2019 Apr 03 21:09:04
Moritz: _/\_ _/\_ _/\_

2019 Apr 03 13:50:42
Cheav Villa:  _/\_ _/\_ _/\_

2019 Apr 03 13:23:48
Johann: Sadhu

2019 Apr 03 13:07:53
Khemakumara: Tomorrow is new moon uposatha,  take this noble opportunity to come together in khema (peaceful).  It is not common,  that living beings are in contact with Buddha,  Dhamma, Sangha.  _/\_ _/\_ _/\_

2019 Apr 02 15:20:21
Cheav Villa:  _/\_ _/\_ _/\_

2019 Apr 02 05:09:56
Johann: Nyom Moritz

2019 Apr 02 04:40:57
Moritz: Good morning Bhante and Chanroth _/\_ And good night to me. :)

2019 Apr 01 17:12:00
Moritz: Good evening Bhante. _/\_

2019 Apr 01 15:16:08
Johann: Nyom Chanroth, Nyom Villa (mudita that those wishing to stay in touch are able here)

2019 Apr 01 04:29:01
Johann: One not having overcome sakayaditthi is not capable to judge right and will always be corrupt.

2019 Mar 31 01:02:21
Johann: One would not let go of ones stand/home.

2019 Mar 31 01:00:01
Johann: As long as Saddha does not arise, it's not right view but stuck in "panna".

2019 Mar 30 10:03:35
Johann: Nyom Moritz

2019 Mar 30 08:48:04
Moritz: Vandami Bhante _/\_

2019 Mar 30 08:28:03
Johann: Samvega, yes, Nyom. If there is no pasada. Cheating is of no help but selfish motivated. Maybe Affirming the Truths of the Heart: The Buddhist Teachings on Samvega  

2019 Mar 30 08:13:03
Kong Sokdina: Vandami Bhante    :D បើចង់ អោយចេះប្រមាណ បើបាន អោយចេះគ្រប់ ជៀរាងការកើតទុក្ខនាំមកនូវសេចក្ដីខកចិត្ត(depressed mood) ។

2019 Mar 29 06:06:43
Johann: Like a path would disappear fastly in the forest, the path for many unseen if nobody steps on it.

2019 Mar 29 06:04:31
Johann: Because Uppekha isn't the highest and nobody would benefit from it.

2019 Mar 29 06:03:18
Johann: And why the even Noble ones and Arahats continue asking, answering, coss-question, giving Anumodana, critic?

2019 Mar 29 00:41:54
Johann: Once knowing good and bad, no more independency of approve of others, thanks, praise for ones sacrifices.

2019 Mar 29 00:40:05
Johann: What ever one does, one does for him/herself. Knowing this it's importand to give praise and approve to ones own skillful deeds, shame and disprove to bad.

2019 Mar 28 08:51:12
Moritz: I am leaving my computer to work without me. May all have a good Uposatha day. _/\_

2019 Mar 28 08:00:48
Moritz: Ja, gut angekommen. Noch nicht ganz umgestellt. :) Bald wieder los zum Taxifahren. _/\_

2019 Mar 28 07:45:55
Johann: Meister Moritz. Gut angekommen und wieder umgestellt?

2019 Mar 28 07:28:51
Moritz: Vandami Bhante _/\_

2019 Mar 28 00:47:42
Johann: May all spend a meritful Sila-day and be able to recoice with their beauty of having given all being the gift of the Uposatha-Silas.

2019 Mar 26 01:18:56
Cheav Villa:  :D _/\_

2019 Mar 26 01:18:46
Cheav Villa: មិនខុសពីរឿងទៅសុំសៀវភៅសន្ទនានុក្រម នៅវ ត្ត បញ្ញា​ និង..

2019 Mar 26 01:16:15
Cheav Villa: កូណា ជារឿងដែលម្នាក់បានទទួលស្តាប់ និងធ្វើតាមតែមិនបានសំរេច តាមគោលដៅ :D _/\_

2019 Mar 25 15:28:24
Johann: Others, even if pure, is open for critic and bad assumings. Envy, jealously... on each side. So to become not susbected, needs good advices, double hard for woman to act perfect.

2019 Mar 25 15:23:21
Johann: Pappies can give good lessons when they don't fall, but the deeper, the hard training, must come from liberal mommies for daughters and liberal pappies for sons, in the world and for beyond.

2019 Mar 25 15:11:15
Cheav Villa:   _/\_ _/\_ _/\_

2019 Mar 25 15:04:40
Johann: Does mommy generally don't actually love her child when not react?

2019 Mar 25 15:03:13
Johann: Mommy, mommy... but I like... ohh, they bite me... I am hungry... when do we go back?... why must we sit here... mommy!

2019 Mar 25 15:00:37
Johann: Which can be changed all the time, with feeding rightly.

2019 Mar 25 14:55:50
Cheav Villa: កូណាសង្ឃឹមថា.​ ជារឿងឧបនិស្ស័យ.​  :D _/\_ _/\_ _/\_

2019 Mar 25 14:50:25
Johann: ...teaching and mirror.

2019 Mar 25 14:49:40
Johann: When one is stressed or busy, remember how many times one him/herself was so as well. Intention will always has it's effects, sometimes quick, sometimes even sisters, mother and child... Nyom wouldn't have become here, if there would be not long, long bounds. Watch your child. Thats always a great t

2019 Mar 25 14:40:41
Cheav Villa: _/\_ _/\_ _/\_

2019 Mar 25 14:39:48
Cheav Villa: ព្រោះកូណាមិនអាចទៅឱរ៉ាល់បានកំឡុងពេលនេះ តែអាចជួបនៅភ្នំពេញបាន តែចេតនាម្ខាងមិនចង់ជួប ទើបមិនអាចជួប

2019 Mar 25 14:38:39
Cheav Villa: កូណាគ្រាន់តែចង់បញ្ជាក់អំពីចេតនា ដែលម្នាក់មាន និងម្នាក់គ្មាន ក្នុងការ​ជួបគ្នា.ជាហេតុមិនបានជួប :D _/\_

2019 Mar 25 14:37:02
Cheav Villa:    _/\_ _/\_ _/\_

2019 Mar 25 13:44:16
Johann: Nyom Vithou. Foot well again?

2019 Mar 25 11:56:36
Johann: Good stories: The Healing of the Bull and Prisoners of Karma .

2019 Mar 25 11:51:20
Johann: Although monks are allowed to explain how to work oneself out, they are not given to liberate "slaves", prisoner, as this would count as thief.

2019 Mar 25 11:46:29
Johann: When one is "bond" in families, relations... there is so much soil and danger for envy and jealously, and itjs not easy to "pay" one out. Normal being live from making others depending on one and fear to lose a "cattle" they gave so much into.

2019 Mar 25 09:53:57
Khemakumara: Nyom Cheav Villa

2019 Mar 25 05:00:43
Johann: Some pull back and offer favors, less are giving ways out. Let them wishing to live in cities go back, maintaining homes. Bond by mara there is no escape, they leave alm bowls behind and step into cars, to "help".

2019 Mar 25 04:11:30
Johann: One (who ever) gives the best when helping, assist, in sharing Dhamma, translate it, sort it, easy accessable and maintain it, by proper and given means.

2019 Mar 25 04:03:32
Cheav Villa:  _/\_ _/\_  _/\_

2019 Mar 25 03:53:23
Johann: One stopped at the topic Sangahak, worldily and best. It's hard to try to translate but bears a lot of fruits. Conceit is dangerous, and a feeling of "right" turns quick into lose. Satipatthana, the right workingplaces. And again Ways of  

2019 Mar 25 02:53:11
Kong Sokdina: ដំណើរផ្លូវឆ្ងាយ មិនប្រមាណ បាននូវសេចក្ដីប្រមាថ។

2019 Mar 24 18:54:30
Cheav Villa: ជាចិត្តលំអៀងព្រោះជំពាក់ក្នុងសេចក្តីស្រលាញ់សាច់ញាតិ​ បងប្អូន.​ ឪពុកម្ដាយ​  ^-^

2019 Mar 24 18:49:47
Cheav Villa: ជារឿងដដែល យូរណាស់មកហើយ  ខ្ញុំ​កូណាគួរតែបានរកឃើញផ្លូវកណ្តាល​  :) _/\_

2019 Mar 24 18:48:21
Cheav Villa: ការជាប់ជំពាក់នៅក្នុងការជួយអ្នកដទៃ ការជាប់ជំពាក់នៅក្នុងការចង់អោយគេបានសុខ តែងនាំសេចក្តីទុក្ខ ដល់ខ្លួន

2019 Mar 24 13:23:44
Johann: Nyom Senghour

2019 Mar 23 06:34:02
Johann: No problem Nyom Vithou.

2019 Mar 23 04:32:25
Vithou: ngyom kuna will inform Preah Ang later when kuna get better

2019 Mar 23 04:31:12
Vithou: Preah Ang, ngyom kuna cannot go Phnom Aural tomorrow due to my foot problem. I let is a bit pain and Ngyom kuna cannot walk properly

2019 Mar 20 19:02:36
Johann: May Nyom have a safe and careful travel, when ever he might do.

2019 Mar 20 18:46:53
Johann: Now, Nyom Moritz and Nyom Sophorn are here in the forest. Atma does not know how long.

2019 Mar 20 18:20:42
Vithou: Nyom Kuna planning to see Moritz and Bong Sophorn as well

2019 Mar 20 18:17:26
Vithou: Nyom Kuna planning to go Phnom Oral on Sunday

2019 Mar 20 18:16:07
Vithou: Nyom Kuna was sick too long after remove kidney stone . ( about 2 months ) and skittle busy with human job

2019 Mar 20 18:13:50
Vithou: Is Moritz and Bong Sophorn at Asram now?

2019 Mar 20 18:12:02
Vithou: Kuna Preah Ang

2019 Mar 20 18:05:01
Johann: Nyom Vithou

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]

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 1134 times)

0 Members and 1 Guest are viewing this topic.

Offline Johann

  • Samanera
  • Very Engaged Member
  • *
  • Sadhu! or +360/-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 +243/-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.

Offline Johann

  • Samanera
  • Very Engaged Member
  • *
  • Sadhu! or +360/-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 +243/-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!

_/\_

Offline Johann

  • Samanera
  • Very Engaged Member
  • *
  • Sadhu! or +360/-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 +243/-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 »

Offline Johann

  • Samanera
  • Very Engaged Member
  • *
  • Sadhu! or +360/-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 +243/-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.
_/\_

Offline Johann

  • Samanera
  • Very Engaged Member
  • *
  • Sadhu! or +360/-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 +243/-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.

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

Offline Johann

  • Samanera
  • Very Engaged Member
  • *
  • Sadhu! or +360/-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

Offline Johann

  • Samanera
  • Very Engaged Member
  • *
  • Sadhu! or +360/-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 +243/-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 »

Offline Johann

  • Samanera
  • Very Engaged Member
  • *
  • Sadhu! or +360/-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 +243/-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: