Skip to content

Commit 3907f9d

Browse files
author
fmoronzirfas
committed
chore(update to latest basil):
1 parent f52731d commit 3907f9d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+1625
-0
lines changed

reference/data/forEach.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
layout: entry
3+
title: forEach
4+
codetitle: 'forEach(collection, cb)'
5+
description: 'Used to run a function on all elements of an array. Please note the existence of the convenience methods `stories()`, `paragraphs()`, `lines()`, `words()` and `characters()` that are used to iterate through all instances of the given type in the given document.'
6+
category: Data
7+
subcategory: Collections
8+
returns: null
9+
parameters:
10+
- {name: collection, description: 'The array to be processed.', optional: false, type: [Array]}
11+
- {name: cb, description: 'The function that will be called on each element. The call will be like function(item,i) where i is the current index of the item within the array.', optional: false, type: [Function]}
12+
kind: function
13+
todo: null
14+
examples: []
15+
16+
---

reference/document/applyMasterPage.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
layout: entry
3+
title: applyMasterPage
4+
codetitle: 'applyMasterPage(page, master)'
5+
description: "Applies a master page to the given page.\n\nThe `page` parameter can be given as a page object, as a page name or as a page number (numbering starts at 1).\n\nThe `master` parameter can be given as a master spread object or as a string. If a string is used, it can either hold the master page prefix (e.g \"A\", \"B\") or the full name *including* the prefix (e.g \"A-Master\", \"B-Master\"). The latter is useful, if there are several masters using the same prefix. Alternatively, the constant `NONE` can be used to apply InDesign's `[none]` master to the page and thus remove the previously applied master page from the page."
6+
category: Document
7+
subcategory: Page
8+
returns:
9+
name: null
10+
description: 'The page the master page was applied to.'
11+
type: [Page]
12+
parameters:
13+
- {name: page, description: 'The page to apply the master page to.', optional: false, type: [Number, String, Page]}
14+
- {name: master, description: 'The master page to apply.', optional: false, type: [String, MasterSpread]}
15+
kind: function
16+
todo: null
17+
examples:
18+
- {description: 'Apply the master with prefix "B" to the documents third page', code: 'applyMasterPage(3, "B");'}
19+
- {description: 'In a document with master pages "A-Text" and "A-Images", apply "A-Images" to the current page', code: 'applyMasterPage(page(), "A-Images");'}
20+
- {description: 'Remove the master page from the page named "IV"', code: 'applyMasterPage("IV", NONE);'}
21+
22+
---
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
layout: entry
3+
title: applyObjectStyle
4+
codetitle: 'applyObjectStyle(item, style)'
5+
description: 'Applies an object style to the given page item. The object style can be given as name or as an object style instance.'
6+
category: Document
7+
subcategory: 'Page Items'
8+
returns:
9+
name: null
10+
description: 'The page item that the style was applied to.'
11+
type: [PageItem]
12+
parameters:
13+
- {name: item, description: 'The page item to apply the style to.', optional: false, type: [PageItem]}
14+
- {name: style, description: 'An object style instance or the name of the object style to apply.', optional: false, type: [ObjectStyle, String]}
15+
kind: function
16+
todo: null
17+
examples: []
18+
19+
---

reference/document/linkTextFrames.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
layout: entry
3+
title: linkTextFrames
4+
codetitle: 'linkTextFrames(textFrameA, textFrameB)'
5+
description: 'Links the stories of two textframes to one story. Text of first textframe overflows to second one.'
6+
category: Document
7+
subcategory: Text
8+
returns: null
9+
parameters:
10+
- {name: textFrameA, description: null, optional: false, type: [TextFrame]}
11+
- {name: textFrameB, description: null, optional: false, type: [TextFrame]}
12+
kind: function
13+
todo: null
14+
examples: []
15+
16+
---

reference/document/objectStyle.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
layout: entry
3+
title: objectStyle
4+
codetitle: 'objectStyle(itemOrName, [props])'
5+
description: 'Returns the object style of a given page item or the object style with the given name. If an object style of the given name does not exist, it gets created. Optionally a props object of property name/value pairs can be used to set the object style''s properties.'
6+
category: Document
7+
subcategory: 'Page Items'
8+
returns:
9+
name: null
10+
description: 'The object style instance.'
11+
type: [ObjectStyle]
12+
parameters:
13+
- {name: itemOrName, description: 'A page item whose style to return or the name of the object style to return.', optional: false, type: [PageItem, String]}
14+
- {name: props, description: 'An object of property name/value pairs to set the style''s properties.', optional: true, type: [Object]}
15+
kind: function
16+
todo: null
17+
examples: []
18+
19+
---

reference/document/placeholder.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
layout: entry
3+
title: placeholder
4+
codetitle: placeholder(textFrame)
5+
description: 'Fills the given text frame and all linked text frames with random placeholder text. The placeholder text will be added at the end of any already existing text in the text frame.'
6+
category: Document
7+
subcategory: Text
8+
returns:
9+
name: null
10+
description: 'The inserted placeholder text.'
11+
type: [Text]
12+
parameters:
13+
- {name: textFrame, description: 'The text frame to fill.', optional: false, type: [TextFrame]}
14+
kind: function
15+
todo: null
16+
examples: []
17+
18+
---

reference/environment/inspect.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
layout: entry
3+
title: inspect
4+
codetitle: 'inspect(obj, [settings])'
5+
description: "Inspects a given object or any other data item and prints the result to the console. This is useful for inspecting or debugging any kind of variable or data item. The optional settings object allows to control the function's output. The following parameters can be set in the settings object:\n- `showProps`: Show or hide properties. Default: `true`\n- `showValues`: Show or hide values. Default: `true`\n- `showMethods`: Show or hide methods. Default: `false`\n- `maxLevel`: Chooses how many levels of properties should be inspected recursively. Default: `1`\n- `propList`: Allows to pass an array of property names to show. If `propList` is not set all properties will be shown. Default: `[]` (no propList)\nIf no settings object is set, the default values will be used."
6+
category: Environment
7+
subcategory: null
8+
returns: null
9+
parameters:
10+
- {name: obj, description: 'An object or any other data item to be inspected.', optional: false, type: [Object]}
11+
- {name: settings, description: 'A settings object to control the function''s behavior.', optional: true, type: [Object]}
12+
- {name: settings.showProps, description: 'Show or hide properties. Default: `true`', optional: true, type: [Boolean]}
13+
- {name: settings.showValues, description: 'Show or hide values. Default: `true`', optional: true, type: [Boolean]}
14+
- {name: settings.showMethods, description: 'Show or hide methods. Default: `false`', optional: true, type: [Boolean]}
15+
- {name: settings.maxLevel, description: 'How many levels of properties should be inspected recursively. Default: `1`', optional: true, type: [Number]}
16+
- {name: settings.propList, description: 'Array of properties to show. Default: `[]` (no propList)', optional: true, type: [Array]}
17+
kind: function
18+
todo: null
19+
examples:
20+
- {description: 'Inspecting a string', code: 'inspect("foo");'}
21+
- {description: 'Inspecting the current page, its methods and an additional level of properties', code: 'inspect(page(), {showMethods: true, maxLevel: 2})'}
22+
- {description: 'Inspecting an ellipse, listing only the properties "geometricBounds" and "strokeWeight"', code: "var myEllipse = ellipse(0, 0, 10, 10);\ninspect(myEllipse, {maxLevel: 2, propList: [\"geometricBounds, strokeWeight\"]});"}
23+
24+
---

reference/environment/printInfo.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
layout: entry
3+
title: printInfo
4+
codetitle: printInfo()
5+
description: 'Print numerous information about the current environment to the console.'
6+
category: Environment
7+
subcategory: null
8+
returns: null
9+
parameters: []
10+
kind: function
11+
todo: null
12+
examples: []
13+
14+
---
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
layout: entry
3+
title: projectFolder
4+
codetitle: projectFolder()
5+
description: 'Get the folder of the active document as a Folder object. Use .absoluteURI to access a string representation of the folder path.'
6+
category: Environment
7+
subcategory: null
8+
returns:
9+
name: null
10+
description: 'The folder of the the active document'
11+
type: [Folder]
12+
parameters: []
13+
kind: function
14+
todo: null
15+
examples: []
16+
17+
---

reference/environment/property.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
layout: entry
3+
title: property
4+
codetitle: 'property(obj, prop, [value])'
5+
description: 'Sets a property of an object or of any other given data item to the specified value. Alternatively an object of key value pairs can be used as the second argument to set several properties to specified values at once. To retrieve a list of available properties for the different data types, the inspect() method can be used.'
6+
category: Environment
7+
subcategory: null
8+
returns:
9+
name: null
10+
description: 'The object or other data item with the newly set property.'
11+
type: [Any]
12+
parameters:
13+
- {name: obj, description: 'An object or any other data item whose properties to change.', optional: false, type: [Any]}
14+
- {name: prop, description: 'A string describing an object''s property or alternatively an object containing key value pairs.', optional: false, type: [String, Object]}
15+
- {name: value, description: 'A value of the appropriate type to set the object''s property to.', optional: true, type: [Any]}
16+
kind: function
17+
todo: null
18+
examples:
19+
- {description: 'Sets name and fill color of an ellipse', code: "var ell = ellipse(100, 100, 50, 50);\nproperty(ell, \"name\", \"Red Circle\");\nproperty(ell, \"fillColor\", color(255, 0, 0));"}
20+
- {description: 'Sets name and fill color of a rectangle and locks it, using an object with key value pairs', code: "var blueSquare = rect(100, 100, 50, 50);\nvar squareProps = {\n name: \"Blue Square\",\n fillColor: color(0, 0, 255),\n locked: true\n}\nproperty(blueSquare, squareProps);"}
21+
22+
---

0 commit comments

Comments
 (0)