Menu

help with macro

2008-11-07
2012-11-13
  • Justin Radar

    Justin Radar - 2008-11-07

    newbie question:

    i've successfully created a macro.

    now, i'd like to modify it so when i select a chunk of text, i can "wrap" that paragraph with some tags.

    for example:

    i'd like to be able to select the following sentence "This is my sentence" and then hit CTRL + SHIFT + P and have the sentence wrapped in paragraph tags, like so.

    <p>This is my sentence</p>

    how do i do this?

    thanks very much.

     
    • Paulo Campioni

      Paulo Campioni - 2008-11-17

      You´re welcome.   Hope it helps. ;-)

       
    • Alexander Iljin

      Alexander Iljin - 2008-11-08

      Try the WebEdit plugin (ANSI version only, no Unicode support).

       
    • Justin Radar

      Justin Radar - 2008-11-12

      thank you

       
    • Paulo Campioni

      Paulo Campioni - 2008-11-12

      Don´t know if I got it right, but you could:

      1. select some text
      2. Start macro recording
      3. Control-X (cut the text)
      4. Insert "<p>"
      5. Control-V (paste the text)
      6. Insert "</p>"
      7. Stop macro recording

      Now select another chunck of text and hit Ctrl-Shift-P and that text will be wrapped.  Voilá !! :-) :-)

      This way you´ll have to re-record the macro everytime you change the tags, but you got the idea ;-)

      Cheers.

       
    • Justin Radar

      Justin Radar - 2008-11-16

      awesome. thanks, i'll try that out.