Avatar

A proposal for making the parent entry visible when replying (Features)

by Auge ⌂, Wednesday, August 17, 2022, 08:45 (49 days ago) @ Micha

Hello,

The SelfHTML-forum [...] That means, that when one inserts text in the textarea or in the input for the subject, this gets displayed immediately in the preview block.


I believe it is an Ajax feature.

I don't know if Ajax/Fetch is in the game. I would assume, that there is no need for a server-client-communication, if the client side rendering works completely independent (with BB-code parsing, etc.). So yes, the feature in the SelfHTML-forum is made with JavaScript but maybe not with Ajax/Fetch.

Adding the input one-to-one to a preview block is quite simple. However, the input is formatted on the fly. That means in our case, the BB-code must be parsed.

To complete the description: this doesn't include code highlightning (because it is made on the server side (PHP lib GesHi)) but it should be able to parse the rest of the BB-codes.

- [b]
- [i]
- [link]
- [link=URL]
- [url]
- [url=URL]
- [color=HEXCODE]
- [size=small]
- [size=large]
- [list] with [*] [1]
- [img] with all its subfeatures
- [inlinecode]
- [code] respecting but not parsing the languages
- smileys as long as we want to support them for new entries (we have the much more powerful emoji support!)
- emojis

Tschö, Auge

[1]: I personally don't like the list implementation because it adds <br /> after closing </li>. This seems to be a limitation of the BB-code-parser-class or a misconfiguration in the parser definitions for lists. But that's my personal opinion and I don't know, what's to change.

--
Trenne niemals Müll, denn er hat nur eine Silbe!


Complete thread:

 RSS Feed of thread