Jump to content

Change leading on hard return.


mmorse

Recommended Posts

Hello - I need to have a rule that changes the leading between a hard return and a natural line break. If the text naturally falls to a second line, I need tighter leading, and on a hard return I need larger leading (or the original leading set in paragraph settings).

 

Here's where I'm at in terms of writing a rule.

 

Note:this rule also forces text to indent when text naturally breaks to second line. This functionality works fine I just need to tighten the leading.

 

Rule:

var indent = '';

var itemName = Field("contentOne");

 

return itemName.split("<p>"+"<magnify type=leading factor=50>").filter(String).map(function(s){return indent.toLowerCase() + s;}).join("</magnify>"+"<p>");

 

Any feedback is much appreciated.

 

Thanks

Link to comment
Share on other sites

Hello - I need to have a rule that changes the leading between a hard return and a natural line break. If the text naturally falls to a second line, I need tighter leading, and on a hard return I need larger leading (or the original leading set in paragraph settings).

 

Here's where I'm at in terms of writing a rule.

You don't need a rule to do this. Just set the "Space below" in the Paragraph Settings dialog, with the paragraph in question selected in the Text Editor.

Note:this rule also forces text to indent when text naturally breaks to second line. This functionality works fine I just need to tighten the leading.

You don't need a rule for this either. Just set the Left indent in the Paragraph Settings, and leave the First Line indent at zero.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...