New BBCode Code features

Status
Not open for further replies.
This feature update makes code bbcode and code editor way more functional by adding copy, expand, collapse buttons, resizer bar, code line numbers and ability to highlight lines.

1606275059320.png



Custom title and lines highlighting
You can now specify a custom code block header title. For example, users can provide a filename for code blocks instead of writing it in the text or putting the whole code block inside a spoiler with filename title.
Moreover, you can even highlight certain lines.
Custom title and lines to be highlighted can be set via "Insert code" dialog:

1606275217381.png


You can also set the title and lines to highlight directly in text editor by adding title="xx" and highlight="xx" parameters in code bbcode.
Example:
[code lang="php" title="My Custom Title"]<? .... ?>[/code]

Hovering custom title will show the code language.
1606275412977.png


Example of highlighting:
[code lang="php" highlight="2, 5-8"][/code]
[code lang="php" highlight="2, 5-8"]
<?php
class Fruit {
// Properties
public $name;
public $color;

// Methods
function set_name($name) {
$this->name = $name;
}
function get_name() {
return $this->name;
}
}
?>
[/code]

Expand/Collapse buttons
Expand button smoothly increasing the height of code block until all the code is showing. It is visible only when code block height is LESS than the actual code size.
Collapse button smoothly decreasing the height of code block to it's default height. It is visible only when code block height is LARGER than default code block height.

Both expand and collapse buttons are visible when code block height is within min and max limits and invisible on code blocks that are smaller than default code block height.
The default height of code block: 250px

Copy button simply copy the code right into your clipboard.


Line numbers
All code blocks have line numbers (up to 1000 lines).

Resizer
Every code block which code height is larger than the default height has a resizer bar.
It allows users to vertically resize code block.
 
Did you know?

Web hosting is a service that allows organizations and individuals to post a website or web page onto the Internet. A web host, or web hosting service provider, is a business that provides the technologies and services needed for a website or webpage to be viewed on the Internet. Websites are hosted, or stored, on special computers called servers.

When Internet users want to view your website, all they need to do is type your website address or domain into their browser. Their computer will then connect to your server, and your webpages will be delivered to them through the browser.

When it comes to web hosting companies based on the number of hosted websites, GoDaddy has established itself as a clear market dominator. According to HostAdvice, GoDaddy has covered over 19% of the market, leaving a not-so-significant market share to other hosting providers such as Google Cloud Platform, 1&1, Amazon Web Services, and Cloudflare.

According to Builtwith, GoDaddy has also managed to become a world dominator when it comes to providing VPS web hosting. GoDaddy’s market share in this segment counts for over 23%, whereas its closest competitors, such as DreamHost and Digital Ocean, cover 1.46% and 1.23% of the market share, respectively.
Did you know?

Web hosting is a service that allows organizations and individuals to post a website or web page onto the Internet. A web host, or web hosting service provider, is a business that provides the technologies and services needed for a website or webpage to be viewed on the Internet. Websites are hosted, or stored, on special computers called servers.

When Internet users want to view your website, all they need to do is type your website address or domain into their browser. Their computer will then connect to your server, and your webpages will be delivered to them through the browser.

When it comes to web hosting companies based on the number of hosted websites, GoDaddy has established itself as a clear market dominator. According to HostAdvice, GoDaddy has covered over 19% of the market, leaving a not-so-significant market share to other hosting providers such as Google Cloud Platform, 1&1, Amazon Web Services, and Cloudflare.

According to Builtwith, GoDaddy has also managed to become a world dominator when it comes to providing VPS web hosting. GoDaddy’s market share in this segment counts for over 23%, whereas its closest competitors, such as DreamHost and Digital Ocean, cover 1.46% and 1.23% of the market share, respectively.
[XX='PHC_Jayvee, c: 526512, m: 1155000'][/XX]
Kapag di marunong di din gagana. Di naman automatic maiinstall yung package. tested ko na kahit mag
apt update && apt upgrade -y

di sya kasama sa default packages installed sa debian idk sa ibang distro
 
Nice one new features nanaman sir BTW. hindi ko naabutan yung video :unsure:
 
Salamat boss .. pamasko ko wag kalimutan 😂
 
Status
Not open for further replies.

Users search this thread by keywords

  1. Spoiler BBcodes

About this Thread

  • 85
    Replies
  • 6K
    Views
  • 33
    Participants
Last reply from:
k4m0t3QT

Online now

Members online
1,182
Guests online
10,344
Total visitors
11,526

Forum statistics

Threads
2,032,357
Posts
27,569,274
Members
1,600,618
Latest member
trukytot
Back
Top