uasoft-indonesia / badaso

Laravel Vue headless CMS / admin panel / dashboard / builder / API CRUD generator, anything !
https://badaso.uatech.co.id
MIT License
1.21k stars 223 forks source link

Breakline in Textarea - Bis #582

Closed Dri372 closed 2 years ago

Dri372 commented 2 years ago

Hi rizkiheryandi

When you edit a 'Textarea' , linebreaks are rendered (that's what I/we expect), but in the browse view linebreaks are not rendered. So 'let textarea just as it should be' means, for me, render the linebreaks in the browse view :-)

Editor is a is too complete/complex tool for such a small layout, and it is not useful since, Textarea edit is Ok without any more input.

See proposed solution in #562

Originally posted by @Dri372 in https://github.com/uasoft-indonesia/badaso/issues/562#issuecomment-1055928988

rizkiheryandi commented 2 years ago

So how about when you edit the data later ?

is your textarea will show the <br/> tag too ?

i think, its better to add a new typefield, so badaso will have a new typefied called "markdown editor" or "mini editor"

so that new typefield will show minimal options rather than "wysiwyg / editor"

you can also create a proposal for that new typefield if possible

fyi, badaso using tinymce for wysiwyg / editor typefield and using full options from tinymce

you can use tinymce too for "mini editor" too, but set the minimal option for that

or if you have another good library for "mini editor" / "markdown editor", we open for discussion too

thankyou in advance

Dri372 commented 2 years ago

So how about when you edit the data later ?

Same as original

is your textarea will show the <'br'/> tag too ?

No, and I never enter the 'br' tag , I just enter multi lines in the standard edit view. Did you understand 'br' tag because I wrote linebreaks? Could it be our misunderstanding?

i think, its better to add a new typefield, so badaso will have a new typefied called "markdown editor" or "mini editor"

Why not, but it's strange that we don't understand each other on a so simple question*. Have you test a multi lines textarea without and with the proposed modif ... If yes, why did you ask the 2 first questions? Can we imagine we don't see the same thing? (my browser is Firefox on Linux Debian or Ubuntu)

...

we open for discussion too

me too, I don't want to force you in anything, communication is always a difficult art. You did/do a very good job, No matter, if, for any reason, we are not able to choose the best solution together, I can live with my small modif "outside" the package, having another "mini editor" is really not a need I have today*.

*my next post will probably be more complex but it is too early to talk about it, I'm not ready and it's far more important (for me) than the previous point.

If you still don't understand, don't hesitate to close this post a second time.

Thanks a lot for your job.

rizkiheryandi commented 2 years ago

No, and I never enter the 'br' tag , I just enter multi lines in the standard edit view. Did you understand 'br' tag because I wrote linebreaks? Could it be our misunderstanding?

I saw your proposed code in previous issue #562 and you convert it to <br/>

Why not, but it's strange that we don't understand each other on a so simple question*. Have you test a multi lines textarea without and with the proposed modif ... If yes, why did you ask the 2 first questions? Can we imagine we don't see the same thing? (my browser is Firefox on Linux Debian or Ubuntu)

Sorry i haven't, i think you can create a codepen or something for this, so i can try it and understand it better.

Maybe, you can also provide link to another existing project that fulfil your expectation about it, so we can try it too and understand it better

Thank you in advance :)

Dri372 commented 2 years ago

Edit

https://ibb.co/1nWkZdf

You can see the note in 2 lines (no special chat added, no br)

Browse

https://ibb.co/7t2J69h

The note is render on 1 line

The proposed modif is very simple and , for me, does not change, textarea usage.

That's all , hope this time I'm clear.

rizkiheryandi commented 2 years ago

The provided link already 404 / not found, could you renew the link please ?

Thank you @Dri372

Dri372 commented 2 years ago

Sorry for that, I updated my previous post.

rizkiheryandi commented 2 years ago

So how the data stored in database ? contain
?

if yes, so like my previous question "is your textarea will show the
tag too when edit the data or rendered too ?"

if it rendered too when edit the data, it's bad because text area doesn't feature to show the "raw" version like the "editor" did

also, in general, textarea dont use for that

if you still wanna the textarea has that feature, i think you can add custom component for that https://badaso-docs.uatech.co.id/customization/custom-component

badaso is fully customize :)

Dri372 commented 2 years ago

So how the data stored in database ? contain ? postgresql

select * from cars;
id | model | power | color |      note      |     created_at      |     updated_at      
----+-------+-------+-------+----------------+---------------------+---------------------
2 | m1    |    50 | Red   |                | 2022-03-10 10:06:12 | 2022-03-10 10:06:12
3 | m2    |    50 | Black |                | 2022-03-10 10:07:24 | 2022-03-10 10:07:24
4 | m2    |    60 | Green |                | 2022-03-10 10:07:46 | 2022-03-10 10:07:46
1 | m1    |    50 | Black | 50 kW motor   +| 2022-03-10 10:03:59 | 2022-03-10 10:03:59
|       |       |       |               +|                     | 
|       |       |       | Black is black |                     | 
(4 rows)

mysql


select * from cars;
+----+-------+-------+-------+-----------------------------+---------------------+---------------------+
| id | model | power | color | note                        | created_at          | updated_at          |
+----+-------+-------+-------+-----------------------------+---------------------+---------------------+
|  1 | m1    |    50 | Red   | NULL                        | 2022-03-24 09:35:05 | 2022-03-24 09:35:05 |
|  2 | m2    |    50 | Black | NULL                        | 2022-03-24 09:35:27 | 2022-03-24 09:35:27 |
|  3 | m2    |    60 | Green | NULL                        | 2022-03-24 09:35:50 | 2022-03-24 09:35:50 |
|  4 | m1    |    50 | Black | 50 kW motor

Black is black | 2022-03-24 09:36:32 | 2022-03-24 09:36:32 | +----+-------+-------+-------+-----------------------------+---------------------+---------------------+



> if yes, so like my previous question "is your textarea will show the
tag too when edit the data or rendered too ?"

https://ibb.co/1nWkZdf

> if it rendered too when edit the data, it's bad because text area doesn't feature to show the "raw" version like the "editor" did
?

> if you still wanna the textarea has that feature, i think you can add custom component
Yes, just strange for me that you seem to not understand this 'symptom' , have you seen/understood the 2 links?

- https://ibb.co/1nWkZdf
- https://ibb.co/7t2J69h
stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.