Recent Topics

[Today at 05:45:55 AM]

[Today at 05:42:15 AM]

[June 25, 2019, 12:55:19 PM]

[June 24, 2019, 10:39:34 AM]

[June 24, 2019, 07:17:31 AM]

[June 24, 2019, 01:58:24 AM]

[June 23, 2019, 04:31:10 PM]

[June 23, 2019, 08:31:21 AM]

[June 23, 2019, 05:45:24 AM]

[June 22, 2019, 06:24:16 AM]

[June 22, 2019, 05:04:59 AM]

[June 21, 2019, 06:57:43 AM]

[June 20, 2019, 09:14:19 AM]

[June 17, 2019, 07:50:33 PM]

[June 16, 2019, 01:11:35 PM]

[June 16, 2019, 05:18:24 AM]

[June 16, 2019, 04:34:53 AM]

[June 15, 2019, 12:43:56 PM]

[June 15, 2019, 11:04:03 AM]

[June 15, 2019, 11:02:12 AM]

[June 15, 2019, 06:57:16 AM]

[June 15, 2019, 06:08:53 AM]

[June 12, 2019, 10:30:41 AM]

[June 12, 2019, 06:13:12 AM]

[June 12, 2019, 05:32:58 AM]

[June 12, 2019, 05:04:05 AM]

[June 12, 2019, 03:27:40 AM]

[June 11, 2019, 03:17:28 PM]

[June 11, 2019, 01:50:14 PM]

[June 11, 2019, 12:35:13 PM]

[June 11, 2019, 11:45:49 AM]

[June 09, 2019, 12:47:01 PM]

[June 09, 2019, 06:08:40 AM]

[June 06, 2019, 06:25:19 AM]

[June 06, 2019, 05:40:23 AM]

[June 06, 2019, 04:52:49 AM]

[June 06, 2019, 04:35:16 AM]

[June 04, 2019, 03:34:05 PM]

[May 31, 2019, 02:10:34 PM]

[May 31, 2019, 11:18:24 AM]

[May 31, 2019, 10:00:56 AM]

[May 31, 2019, 07:33:31 AM]

[May 30, 2019, 04:34:37 AM]

[May 29, 2019, 01:23:15 PM]

[May 29, 2019, 10:32:44 AM]

[May 29, 2019, 05:37:30 AM]

Talkbox

2019 Jun 26 01:07:18
Johann: Good to hear

2019 Jun 25 16:22:42
Cheav Villa: ជំរាបសួរបងស្រី Norum  :D _/\_

2019 Jun 25 12:48:21
Vithou:  _/\_

2019 Jun 25 05:02:43
Cheav Villa:  _/\_ _/\_ _/\_

2019 Jun 25 01:34:59
Johann: May all spend a blessed meritful Sila observing day today

2019 Jun 25 01:34:36
Johann: May all spend a blessed meritful Sila observing day today

2019 Jun 25 01:34:17
Johann: May all spend a blessed meritful Sila observing day today

2019 Jun 23 19:01:54
Vithou:  _/\_

2019 Jun 17 10:19:29
Johann: Bhante Khemakumara. Everything fine, health? Can he walk like before already?

2019 Jun 17 06:34:44
Johann: Sadhu, Sadhu

2019 Jun 17 03:56:38
Cheav Villa: សាធុ សាធុ _/\_ _/\_ _/\_

2019 Jun 17 00:46:14
Khemakumara: May all have a joy-full and fruit-full  Uposatha full-moon day

2019 Jun 15 17:53:43
Cheav Villa: កូណាព្រះអង្គទាំងអស់គ្នាសុខទុក្ខធម្មតា ទាំងសុខភាពឈឺ ជា មិនទៀងទាត់  _/\_ _/\_ _/\_ ស្រីមុខក្រញ៉ូវ គាត់មានសុខភាពល្អជា

2019 Jun 15 13:03:21
Johann: All health?

2019 Jun 15 13:02:56
Johann: Nyom Muk-kamau?

2019 Jun 15 13:01:36
Johann: And own well-being, family?

2019 Jun 15 12:48:22
Johann: Maybe all busy like most at this times.

2019 Jun 15 12:44:14
Cheav Villa: បងពុទ្ធី និងវិធូរ ខ្ញុំកូណាមិនបានជួបគ្នា និងទាក់ទងគ្នាទេ ប៉ុន្មានខែចុងក្រោយនេះ _/\_ _/\_ _/\_

2019 Jun 15 12:42:16
Cheav Villa: ថ្វាយបង្គំព្រះអង្គ  _/\_ _/\_ _/\_

2019 Jun 15 04:21:08
Johann: Nyom Villa. All fine? Nyoms fellows, like Nyom Buddhi... havn't been seen since longer. All fine with friends and family?

2019 Jun 10 04:05:23
Cheav Villa: Sadhu Sadhu  _/\_ _/\_ _/\_

2019 Jun 10 01:47:04
Johann: Sadhu, Sadhu

2019 Jun 10 01:28:53
Khemakumara: May all have a fruitful waxing moon Uposatha!

2019 Jun 10 01:26:44
Khemakumara: Silena sugatiṁ yanti. Through virtue they go to a good destination.  Silena bhoga-sampadā.  Through virtue is wealth attained.  Silena nibbutiṁ yanti. Through virtue they go to Unbinding.  Tasmā silaṁ visodhaye. Therefore we should purify our virtue.

2019 Jun 06 14:52:24
Khemakumara:  _/\_ _/\_ _/\_ kana,  Bhante. The wound heals fast and good.

2019 Jun 06 13:46:02
Johann: Bhante is fine, at least better?

2019 Jun 05 11:53:33
Cheav Villa:  _/\_ _/\_ _/\_

2019 Jun 05 05:19:35
Johann: "N'atthi santi param sukham", there is no peace equal the hail of release

2019 Jun 04 10:25:51
Johann: Nyom Villa

2019 Jun 04 05:13:11
Cheav Villa:  _/\_ _/\_ _/\_

2019 Jun 02 12:03:42
Cheav Villa: Sadhu Sadhu  _/\_ _/\_ _/\_

2019 Jun 02 00:29:09
Johann: May all enjoy the bliss of the fruitful observing of the Uposatha

2019 May 31 14:40:02
Cheav Villa: សាធុ​ សាធុ  _/\_ _/\_ _/\_

2019 May 31 13:47:09
Johann: Sadhu and Anumodana Nyom.

2019 May 31 12:40:14
Cheav Villa: សូមអោយព្រះអង្គឆាប់ជាសះស្បើយ  _/\_ _/\_ _/\_

2019 May 31 12:39:05
Cheav Villa: ព្រះអង្គKhemakumara ត្រូវបានពុទ្ធបរិស័ទនិមន្តទៅគ្លីនីកនៅជិតវត្តកាលពីម៉ោង​2 និងបានវះកាត់ព្យាបាល រួចត្រឡប់ទៅវត្ត

2019 May 31 12:36:20
Cheav Villa: ថ្វាយបង្គំ​ ព្រះ​អង្គ​ _/\_ _/\_ _/\_

2019 May 29 09:03:01
Johann: Had overseen Bhante here. Bhante Ariyadhammika  _/\_

2019 May 29 02:19:33
Khemakumara: Bhante Johann  _/\_ _/\_ _/\_

2019 May 28 04:18:48
Cheav Villa:  _/\_ _/\_ _/\_

2019 May 27 10:03:55
Johann: Much in German, Nyom, currently. Atma will try to translate as much as possible, step by step.

2019 May 26 03:04:21
Cheav Villa:  _/\_ _/\_ _/\_

2019 May 26 03:04:06
Cheav Villa: សាធុ​

2019 May 26 01:02:17
Johann: Sadhu

2019 May 26 00:44:22
Khemakumara: May all have a meritful Uposatha day. Meeting some good friends (kalyanamitta) and som(e) sil(a) សំម សីល!

2019 May 24 14:13:29
Johann: Nyom Moritz

2019 May 24 13:28:52
Moritz: Vandami Bhante _/\_

2019 May 24 05:23:33
Johann: Venerable

2019 May 24 05:22:57
Khemakumara:  _/\_ _/\_ _/\_ Bhante Johann

2019 May 24 02:08:29
Johann: Nyom Moritz, Nyom Villa.

2019 May 24 01:55:56
Cheav Villa:  _/\_ _/\_ _/\_

2019 May 24 01:54:14
Moritz: Bong Villa _/\_

2019 May 24 01:49:43
Moritz: Vandami Bhante _/\_

2019 May 24 01:06:04
Johann: Venerable Ariyadhammika  _/\_

2019 May 20 04:14:26
Cheav Villa:  _/\_ _/\_ _/\_

2019 May 20 01:31:27
Johann:  _/\_ Bhante Indannano

2019 May 19 11:28:39
Khemakumara: Nyom Cheav Villa

2019 May 19 11:27:48
Khemakumara:  _/\_ _/\_ _/\_ Bhante Johann  _/\_ _/\_ _/\_

2019 May 18 23:55:08
Moritz: Vandami Bhante _/\_

2019 May 18 10:34:49
amanaki: Thank you Johann  _/\_

2019 May 18 09:59:33
Johann: Nyom Amanaki. Mudita that you may have possible found what searched for on a special day.

2019 May 18 09:24:56
Maria:  _/\_

2019 May 18 09:24:35
Maria: werter Bhante!

2019 May 18 09:22:43
Johann: Nyom Mizi

2019 May 18 09:21:31
Johann: Nyom Sophorn, Nyom Villa... may all here but also there rejoice in own and others goodness.

2019 May 18 05:03:47
Cheav Villa: សាធុ​សាធុ _/\_ _/\_ _/\_

2019 May 18 02:16:49
Moritz: _/\_ _/\_ _/\_

2019 May 14 07:51:30
Vithou:  _/\_

2019 May 14 05:40:54
Johann: As long as not using telefon while riding. Sokh chomreoun, Nyom.

2019 May 13 18:38:46
Moritz: Vandami Bhante _/\_ (sitting in Taxi)

2019 May 12 15:44:32
Johann: But better ask Nyom Chanroth, since Atma does not walk that far these days.

2019 May 12 15:04:01
Johann: not teally, Nyom Vithou. Still less water in the streams here. Some still dry. Needs a while down from the mountains and not that much rain yet.

2019 May 12 14:54:37
Vithou: how is the road Bhante? Is it float at the mountain leg?

2019 May 12 14:51:59
Vithou:   _/\_

2019 May 12 14:40:43
Johann: Nyom Vithou. Nothing special. Yes, rain is present every afternoon since some days.

2019 May 12 14:38:33
Vithou: Bhante, how is everything at Asrum? Is it raining everyday?

2019 May 12 07:05:30
Cheav Villa:  _/\_ _/\_ _/\_

2019 May 12 03:58:19
Johann: a joyful day in merits on this Sila-day

2019 May 11 17:04:10
Cheav Villa:  :) _/\_

2019 May 11 16:16:56
Moritz: Bong Villa _/\_

2019 May 11 05:35:39
Cheav Villa: Sadhu Sadhu Sadhu  _/\_ _/\_ _/\_

2019 May 11 00:52:44
Johann: an meritful Uposatha, those keeping it today

2019 May 10 17:14:43
Moritz: Chom reap leah, I am going to work. _/\_

2019 May 10 17:09:07
Johann: Nyom Moritz

2019 May 10 17:07:14
Moritz: Vandami Bhante _/\_

2019 May 10 16:19:14
Moritz: Chom reap sour, bong Villa _/\_

2019 May 07 19:12:10
Johann: Nyom Vithou. Just some hours ago, thought of him.

2019 May 05 04:26:53
Chanroth:  _/\_ _/\_ _/\_

2019 May 04 11:41:08
Cheav Villa:  _/\_ _/\_ _/\_

2019 May 04 10:27:38
Khemakumara: Nyom Cheav Villa

2019 May 03 10:08:09
Khemakumara: Sadhu, sadhu, sadhu  _/\_ _/\_ _/\_

2019 May 03 01:17:53
Johann: A meritful new moon Uposatha those celebrating it today.

2019 May 03 01:16:05
Johann: Talk box is buggy and lines love to jump. Better not editing.

2019 May 03 01:14:19
Johann: U Chanroth: "ថ្ងៃនេះខ្ញុំបាទ បានទទួលនៅសម្ភារៈមួយចំនួន សម្រាប់កសាងអាស្រមថ្មទូកសូមជូនបុណ្យដល់ពុទ្ធបរិសទ័ទាំងអស់គ

2019 May 02 15:15:58
Cheav Villa:   <.I.> _/\_

2019 May 02 15:15:17
Cheav Villa: Sorry because of kh font doesn't run well on my phone. Kana go to edit  to see the right  shout but  was wrong by deleting Pou  Chanroth 's  shout

2019 May 02 15:01:04
Cheav Villa: Mudita  :) _/\_

2019 May 02 13:47:17
Moritz: Anumodana puñña kusala! _/\_

2019 May 01 14:49:38
Johann: Now some monks are so close to many, that they can be visited even by feet.

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

0 Members and 1 Guest are viewing this topic.

Offline Johann

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