How to quickly create the list with the links?

Let us know what you would like to see in the next version of this software

Moderator: kfury77

Forum rules
Please follow these guidelines when posting feature requests. This will help to increase the value of your contribution.
  • Do not create new topics for already requested features. Add your comments to the existing feature request topics instead;
  • Create separate topic for each feature suggestion. Do NOT post a number of non-related feature suggestions in a single topic;
  • Give your topic a meaningful title. Do NOT create topics with meaningless titles, such as "My Suggestion" or "My Problem".
Please note that we DO READ all suggestions, even if a reply is not posted. Thanks!
Post Reply
Dimox
Posts: 6
Joined: Tue Jul 21, 2009 11:30 am

How to quickly create the list with the links?

Post by Dimox »

I want to create the list with the links like this:

Code: Select all

<ul>
  <li><a href="#">Home</a></li>
  <li><a href="#">About</a></li>
  <li><a href="#">Contacts</a></li>
</ul>
As far as i know, Rapid PHP allows to do this by following way:

1. Initial text:

Code: Select all

Home
About
Contacts
2. By selecting it and pressing the hot key (or menu 'Format HTML -> Bulleted List) I get such a result:

Code: Select all

<ul>
  <li>Home</li>
  <li>About</li>
  <li>Contacts</li>
</ul>
3. Now I must put manually <a> tag in each list item.

There is a way to quickly create such a list with the links?
User avatar
syrupcore
Top Contributor
Posts: 917
Joined: Thu Jul 21, 2005 12:58 am
Location: Portland, Oregon, usa
Contact:

Re: How to quickly create the list with the links?

Post by syrupcore »

I usually do it with snippets, line by line. I have "wrap" snippets for <li> (ctrl+alt+L) and <a> (ctrl+alt+A). I select the text and hit those two shortcuts.


You could also do it with find and replace.
<ul>
<li>Home</li>
<li>About</li>
<li>Contacts</li>
</ul>

find: <li>
replace: <li><a href="#">

find </li>
replace </a></li>
Dimox
Posts: 6
Joined: Tue Jul 21, 2009 11:30 am

Re: How to quickly create the list with the links?

Post by Dimox »

syrupcore, this is also a long way.
User avatar
syrupcore
Top Contributor
Posts: 917
Joined: Thu Jul 21, 2005 12:58 am
Location: Portland, Oregon, usa
Contact:

Re: How to quickly create the list with the links?

Post by syrupcore »

for sure, regex inside of snippets (ala textmate or E) would make this a whole lot faster.

That said, you may be surprised at how fast the snippet method is. Remember there is also a shortcut for "select content between tags".

Code: Select all

    <ul>
      <li>Home</li>
      <li>About</li>
      <li>Contacts</li>
    </ul>
stick the cursor inside of 'home' and hit ctrl+shift+q (select between tags) and then trigger the link snippet (mine is ctrl+alt+A) or webuilder's internal link method with ctrl+k.

the link snippet:

Code: Select all

before:
<a href="%[url]=[#]%">

after:
</a>

and another fast(ish) option.
paste "<li><a href="#"></a></li>" however many times you'll need it - make sure they're lined up like:

Code: Select all

<ul>
	<li><a href="#"></a></li>
	<li><a href="#"></a></li>
	<li><a href="#"></a></li>
	<li><a href="#"></a></li>
</ul>
in the first <a> type "home" then hit Ctrl+left then hit down. type the next. repeat.
User avatar
syrupcore
Top Contributor
Posts: 917
Joined: Thu Jul 21, 2005 12:58 am
Location: Portland, Oregon, usa
Contact:

Re: How to quickly create the list with the links?

Post by syrupcore »

all that said, a way to have a snippet trigger on "each line of the selection" would own.

Then you could write your list in plain text

Home
Links
About
Contacts

and wrap each line with a snippet like
(before)
<li><a href="#">

(after)
</a></li>

or TDs or DDs or whatevers. I use this sort of thing a lot in textmate. it's a win.
Dimox
Posts: 6
Joined: Tue Jul 21, 2009 11:30 am

Re: How to quickly create the list with the links?

Post by Dimox »

syrupcore wrote: stick the cursor inside of 'home' and hit ctrl+shift+q (select between tags) and then trigger the link snippet (mine is ctrl+alt+A) or webuilder's internal link method with ctrl+k.
I always have to do so. But I want to find a way, when I will select the text:

Home
About
Contacts

and press ONLY ONE hot key to get the result:

Code: Select all

<ul>
  <li><a href="#">Home</a></li>
  <li><a href="#">About</a></li>
  <li><a href="#">Contacts</a></li>
</ul>
Everything else - not what I need.
User avatar
chrisjlocke
Top Contributor
Posts: 995
Joined: Mon Aug 01, 2005 4:12 pm
Location: Essex, UK
Contact:

Re: How to quickly create the list with the links?

Post by chrisjlocke »

This is where my trusty copy of VB6 comes in. I have to do this a lot at work (entering datasheets into HTML pages for our website) so created a quick VB6 program to add links for selected text.
The obvious downside is that its a third-party program and not within WeBuilder, so it can be a pain to launch. However, I've a program launcher thingy doodah which helps with that too! ;)
I'll post it up later, so at least its helpful to someone...
User avatar
syrupcore
Top Contributor
Posts: 917
Joined: Thu Jul 21, 2005 12:58 am
Location: Portland, Oregon, usa
Contact:

Re: How to quickly create the list with the links?

Post by syrupcore »

Dimox wrote:... Everything else - not what I need.
everything else is all you got for now. so then, moving this to feature requests.
Dimox
Posts: 6
Joined: Tue Jul 21, 2009 11:30 am

Re: How to quickly create the list with the links?

Post by Dimox »

syrupcore, thanks!
User avatar
chrisjlocke
Top Contributor
Posts: 995
Joined: Mon Aug 01, 2005 4:12 pm
Location: Essex, UK
Contact:

Re: How to quickly create the list with the links?

Post by chrisjlocke »

v1.0 of my list creator thingy. I'll add the option to add links.

http://www.chrisjlocke.co.uk/content/29 ... thingy.htm
Dimox
Posts: 6
Joined: Tue Jul 21, 2009 11:30 am

Re: How to quickly create the list with the links?

Post by Dimox »

chrisjlocke, unwise to use third-party programs for such simple task.
User avatar
chrisjlocke
Top Contributor
Posts: 995
Joined: Mon Aug 01, 2005 4:12 pm
Location: Essex, UK
Contact:

Re: How to quickly create the list with the links?

Post by chrisjlocke »

As noted in my post above. Still, it'll be handy for someone. Somewhere. Maybe.
CaliforniaJerry
Posts: 88
Joined: Sat Aug 01, 2009 4:48 am
Location: Mountain View, CA
Contact:

Re: How to Integrate Snippets or VB Macros?

Post by CaliforniaJerry »

This idea of a third-party VB code has me thinking, would it be possible to integrate VB and/or Perl script macros into WeBuilder (or other Blumentals programs), such as how Excel does it ?
User avatar
chrisjlocke
Top Contributor
Posts: 995
Joined: Mon Aug 01, 2005 4:12 pm
Location: Essex, UK
Contact:

Re: How to quickly create the list with the links?

Post by chrisjlocke »

The idea of plugins and/or macros has been suggested before. Its the best compromise for people who want extra features, against the people who want a fast slick editor. Karlis is trying to do a juggling act trying to find the right balance between the two. This is why the plugin model works well for Firefox. You simply get a slick browser, or you can add the bits you want, and ignore the bits you don't.

Maybe one day...
johnfowles
Posts: 3
Joined: Tue Jun 23, 2015 10:45 pm

Re: How to quickly create the list with the links?

Post by johnfowles »

Thanks to the sheer brilliance of HTMLPad this task could not be made any easier
I literally stumbled upon it because I had never seen any details anywhere
simply go ahead and create in new untitled page your list of items to be made into a list (either numbered or bulleted and it can include properly formatted hyperlinks) then highlight the completed list then just double click the required icon on the menu bar and Hey Presto bingo HTMLPad will automatically quickly add the necessary < u> or <ul> opening and closing tags properly located before and after your list and enclose each item in the list with an <l>…</li> tag pair I am preparing a tutorial web page including this fantastic news a work in progress under the working title of "the sheer brilliance of HTMLPad"
Here is a tad of proof that that method works with hyperlinks
Image
try that third link a great plug for our proggie!!
Last edited by johnfowles on Thu Oct 18, 2018 9:40 pm, edited 1 time in total.
Post Reply