#5630 (TextFieldElement renders as rich editor even when TextField.format is "plain")
by Luc Saffre · in Developers · assigned to Sharif Mehedi
Kurzbeschreibung
Kinder
Kommentare
- 2 Jahre, 4 Monate ago von Luc Saffre about #5630 (TextFieldElement renders as rich editor even when TextField.format is "plain") : I changed the core and the documentation: the format of a textfield ("plain" or "html" must be specified using the "format" keyword. The "textfield_format" attribute is no longer used on the field object (it does remain as a Site attribute)).
- 2 Jahre, 4 Monate ago von Luc Saffre about #5630 (TextFieldElement renders as rich editor even when TextField.format is "plain") : This "bug" was [url dev.lino-framework.org/dev/textfield.html clearly documented], the docs said "you can specify two additional keyword arguments ``textfield_format`` and ``bleached``. You may also specify a keyword ``format`` when instantiating a :class:`RichTextField`, which will be stored to :at...
- 2 Jahre, 4 Monate ago von Luc Saffre about #5630 (TextFieldElement renders as rich editor even when TextField.format is "plain") : The bug was in the Lino core: the attribute holding the format of a field was still named textfield_format for historica reasons.
- 2 Jahre, 4 Monate ago von Luc Saffre about #5630 (TextFieldElement renders as rich editor even when TextField.format is "plain") : @8lurry please have a look at this: runserver in cms1, click on "Admin", sign in as robin, select menu --> Publisher -> Pages, click on "Home" to see the detail. Click on "General" tab. Start the editor. This should now be plain text, but it is still rich (AFAICS).
- 2 Jahre, 4 Monate ago von Luc Saffre about #5630 (TextFieldElement renders as rich editor even when TextField.format is "plain") : I didn't yet manage to make this visible. I will finish my local work and then push my changes.
- 2 Jahre, 4 Monate ago von Sharif Mehedi about #5630 (TextFieldElement renders as rich editor even when TextField.format is "plain") : @luc , I've pushed my little changes in react and lino. you can probably now continue to play around with markdown now.
- 2 Jahre, 4 Monate ago von Sharif Mehedi about #5630 (TextFieldElement renders as rich editor even when TextField.format is "plain") : Sure
- 2 Jahre, 4 Monate ago von Luc Saffre about #5630 (TextFieldElement renders as rich editor even when TextField.format is "plain") : Let's talk on Jitsi. I'll be available there in a few minutes.
- 2 Jahre, 4 Monate ago von Sharif Mehedi about #5630 (TextFieldElement renders as rich editor even when TextField.format is "plain") : In quill we can call, "quill.getText()" that returns plain text. See: Markdown example We can use it when we use the raw editing mode.
- 2 Jahre, 4 Monate ago von Luc Saffre about #5630 (TextFieldElement renders as rich editor even when TextField.format is "plain") : Or in short: Make TextFieldElement render as a plain text editor field when TextField.format is "plain". Users do NOT need to toggle dynamically between plain and rich editor.
- 2 Jahre, 4 Monate ago von Luc Saffre about #5630 (TextFieldElement renders as rich editor even when TextField.format is "plain") (1 Antwort) : Actually GitHub doesn't use a "rich" (wysiwyg) text editor like quill. The toolbar for formatting actually just inserts markup. I think we should do it like GitHub.
- 2 Jahre, 5 Monate ago von Luc Saffre about #5630 (TextFieldElement renders as rich editor even when TextField.format is "plain") : I guess that we want to store the raw markdown text in the database even when the user has switched to "rich" editor. I guess that for this we would need a html2markdown() function. Both are just guesses.
- 2 Jahre, 5 Monate ago von Luc Saffre about #5630 (TextFieldElement renders as rich editor even when TextField.format is "plain") : There's more to say about this. I think that we want a possibility to dynamically switch between "raw" and "rich" editor for a same text field.
- 2 Jahre, 5 Monate ago von Luc Saffre about #5630 (TextFieldElement renders as rich editor even when TextField.format is "plain") : @8lurry we should have a Jitsi session about this.
- 2 Jahre, 5 Monate ago von Luc Saffre about #5630 (TextFieldElement renders as rich editor even when TextField.format is "plain") : This wasn't an issue until now. But if the #5623 (Replace memo parser by markdown?) ticket goes live, we have a new situation. End users must be able to edit plain text (with markup).
- 2 Jahre, 5 Monate ago von Luc Saffre about #5630 (TextFieldElement renders as rich editor even when TextField.format is "plain") : Created new Ticket #5630 (TextFieldElement renders as rich editor even when TextField.format is "plain").