Topic
  • 3 replies
  • Latest Post - ‏2013-04-18T11:16:29Z by Tony_Goodman
SystemAdmin
SystemAdmin
3180 Posts

Pinned topic Control-Shift-L Function Button needed

‏2013-04-04T13:30:30Z |
Greetings,

We use the magical Control-Shift-L to do formatting. I would like to make this function a button. Does anyone have the dxl for this operation or something similar to it? Primarily this is used to make bulleted lists where the text is all indented. Just using the bullet button and the indent button doesn't align the text but will wrap to the start of the bullet. I would like to be able to highlight text, hit a button and have it bulletted and text aligned. It would be also okay to make a button that the callback function is calling the DOORS Control-Shift-L function.

Thanks,
Greg
Updated on 2013-04-04T13:39:38Z at 2013-04-04T13:39:38Z by Tony_Goodman
  • Tony_Goodman
    Tony_Goodman
    270 Posts

    Re: Control-Shift-L Function Button needed

    ‏2013-04-04T13:39:38Z  

    The following will do what you ask.
     

    if (inplaceEditing(current Module))
    {
        callStdItem_(inplaceTextBulletItem)
    }
    

     


    Tony Goodman, www.smartdxl.com

     

    Updated on 2014-01-06T10:04:37Z at 2014-01-06T10:04:37Z by iron-man
  • GregM_dxler
    GregM_dxler
    166 Posts

    Re: Control-Shift-L Function Button needed

    ‏2013-04-17T13:01:50Z  

    The following will do what you ask.
     

    <pre class="javascript dw" data-editor-lang="js" data-pbcklang="javascript" dir="ltr">if (inplaceEditing(current Module)) { callStdItem_(inplaceTextBulletItem) } </pre>

     


    Tony Goodman, www.smartdxl.com

     

    Thanks Tony, sorry for the slow response.  It is not quite what I need.

    When I run this, it adds a bullet, but the text wraps around to the start of the bullet.  When I do a Cntrl-Shift-L, the text wraps to align with the start of the text.  This is what I really need since it is better formatting and easier to read.  Ideally, I would like to be able to have this work in a rich text field in a dialog box.  I've already verified that Cntrl-Shift-L will work in the rich text field.

    I know I could get the rich text codes that DOORS uses and make my own script to insert that into the rich text, but just wondered if anyone else knew if there is a command for this already.

    Greg

    Updated on 2013-04-17T13:02:05Z at 2013-04-17T13:02:05Z by GregM_dxler
  • Tony_Goodman
    Tony_Goodman
    270 Posts

    Re: Control-Shift-L Function Button needed

    ‏2013-04-18T11:16:29Z  

    I see.

    Crtl-Shift-L does indeed add a hanging indent the the text, whereas the bullet button does not.

    Looking at the rich text, the only difference is the addition of "\fi-360\li360" which creates the hanging indent.

    I also notice that this works in MS Word etc, so it may be a windows thing rather than a DOORS thing.

    Tony

    Updated on 2013-04-18T11:23:52Z at 2013-04-18T11:23:52Z by Tony_Goodman