| |

VerySource

 Forgot password?
 Register
Search
Author: chinachina1

The format of the label when displaying news content is ugly, how to solve it?

[Copy link]

1

Threads

7

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

 Author| Post time: 2020-9-25 23:30:01
| Show all posts
I looked at how it is usually FCKeditot for java?
And it seems to be very complicated to use?
Reply

Use magic Report

0

Threads

12

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

Post time: 2020-9-26 00:45:01
| Show all posts
Not very complicated!
If you want to use FCKEditor under .net, you also need a .net dll support
Reply

Use magic Report

1

Threads

60

Posts

37.00

Credits

Newbie

Rank: 1

Credits
37.00

 China

Post time: 2020-9-26 01:00:01
| Show all posts
FreeTextBox uses this
Reply

Use magic Report

1

Threads

7

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

 Author| Post time: 2020-9-26 01:15:01
| Show all posts
Where can I find a better tutorial? Don't understand
Reply

Use magic Report

1

Threads

60

Posts

37.00

Credits

Newbie

Rank: 1

Credits
37.00

 China

Post time: 2020-9-26 08:45:01
| Show all posts
I searched for it myself, I used it slowly, ha ha
Reply

Use magic Report

0

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-9-26 12:45:01
| Show all posts
If you want FreeTextBox, I can give you one, huh
Reply

Use magic Report

0

Threads

6

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-9-26 18:00:01
| Show all posts
Use this function to format content when adding content to the database:
Function Format(formatdata)
formatdata=replace(formatdata,"&","&")
         'formatdata=replace(formatdata,"'","''")
         formatdata=replace(formatdata,"<","&lt;")
         formatdata=replace(formatdata,">","&gt;")
         formatdata=replace(formatdata,"chr(60)","&lt;")
         formatdata=replace(formatdata,"chr(37)","&gt;")
         formatdata=replace(formatdata,"""","&quot;")
         'formatdata=replace(formatdata,";",";;")
         formatdata=replace(formatdata,chr(13),"<br>"&chr(13)+chr(10))
         format=replace(formatdata,chr(32),"&nbsp;")
    End Function


------------------------
When reading data, use the following function to restore the original input content:
Function UFormat(formatdata)
'formatdata=replace(formatdata,"&amp;","&")
        'formatdata=replace(formatdata,"''","'")
        formatdata=replace(formatdata,"&lt;","<")
        formatdata=replace(formatdata,"&gt;",">")
        formatdata=replace(formatdata,"&lt;","chr(60)")
        formatdata=replace(formatdata,"&gt;","chr(37)")
        formatdata=replace(formatdata,"&quot;","""")
        'formatdata=replace(formatdata,";;",";")
        formatdata=replace(formatdata,"<br>"&chr(13)+chr(10),chr(13))
        Uformat=replace(formatdata,"&nbsp;",chr(32))
    End Function
Reply

Use magic Report

0

Threads

9

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-9-26 18:45:01
| Show all posts
I remember just converting the spaces into BR.
Reply

Use magic Report

1

Threads

60

Posts

37.00

Credits

Newbie

Rank: 1

Credits
37.00

 China

Post time: 2020-9-26 19:15:01
| Show all posts
So, let me give you a piece of code, you still use textbox for input, and then format it.
    public string ShowText(string str)
    {
        str = str.Replace(" ", "&nbsp;");
        str = str.Replace(" ", "&nbsp;&nbsp;");
        str = str.Replace("\n", "<br/>");

        return str;
    }
The display is displayed by label, call it, and this function will be displayed after it is displayed.
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list