# Text Style ⏳
# Method Description
blah!
# Method Properties and Screenshot
See Basic Stroke and Fill Properties.
Mode | Description |
---|---|
add | Adds / inserts a new paint field at the given index |
addEdit | Edits an existing paint field, existing properties will be kept besides those explicitly changed. If the paint field does not exist it will be added. This is the default mode. |
addEditRE | Edits an existing paint field, existing properties will be kept besides those explicitly changed. Effects however, will be removed from the paint field. If the paint field does not exist it will be added. |
edit | Edits an existing paint field, existing properties will be kept besides those explicitly changed. If the paint field does not exist it will NOT be added. |
editRE | Edits an existing paint field, existing properties will be kept besides those explicitly changed. Effects however, will be removed from the paint field. If the paint field does not exist it will NOT be added. |
remove | Removes the targeted paint field |
replace | Replaces all existing properties including effect from the targeted paint field with newly provided properties |
# Sample Spreadsheet
Compare each row in the spreadsheet below with its associated screenshot above.
star | ||
appearance | ||
stroke[1]mode | stroke[1]color | stroke[1]width: 2pt |
See associated graphic 👆 | ||
add | #red | 2pt |
replace | #cyan | 2pt |
addEdit | #purple | 2pt |
addEditRE | #green | 2pt |
editRE | #orange | 2pt |
edit | #lime | 2pt |
remove |
# editTextStyle
Edits an existing named character or paragraph style.
{"tagSearch": "957", "searchText": "Leo", "charStyle": "Arial BI", "replace": true}
Copy character properties of a searchText
to a named character style Arial BI
.
{"tagSearch": "957", "searchText": "Leo", "paraStyle": "R 5pt", "replace": true}
Copy paragraph properties of a searchText
to a named paragraph style R 5pt
.
{"newStyle": {"fillColor": {"channel_1":0, "channel_2":100, "channel_3":100, "channel_4":0, "colorSpace":"CMYK"}}, "charStyle": "Arial BI", "replace": true}
Copy newStyle
to a named character style Arial BI
.
{"newStyle": {"fillColor": {"channel_1":0, "channel_2":100, "channel_3":100, "channel_4":0, "colorSpace":"CMYK"}, "justification":"center"}, "paraStyle": "R 5pt", "replace": true}
Copy newStyle
to a named paragraph style R 5pt
Remove "replace": true
from any of examples above to merge new properties with existing properties instead of replacing them.
textstyle: {
characterstyle: {
dispatchName: "editTextStyle",
dispatchParameter: "charStyle",
dispatchParent: "textFeatures",
isString: true,
key: "characterstyle",
},
clearcharacteroverrides: {
dispatchName: "editTextStyle",
dispatchParameter: "clearOverridesChar",
isBoolean: true,
key: "clearcharacteroverrides",
},
clearoverridesofwholeparagraph: {
dispatchName: "editTextStyle",
dispatchParameter: "clearOverridesOfWholeParagraph",
isBoolean: true,
key: "clearoverridesofwholeparagraph",
},
clearparagraphoverrides: {
dispatchName: "editTextStyle",
dispatchParameter: "clearOverridesPara",
isBoolean: true,
key: "clearparagraphoverrides",
},
composer: {
dispatchName: "editTextStyle",
dispatchParameter: "composerEngine",
dispatchParent: "textFeatures",
key: "composer",
kString: "composer",
},
fillcolor: {
dispatchName: "editTextStyle",
dispatchParameter: "fillColor",
dispatchParent: "textFeatures",
key: "fillcolor",
},
find: {
dispatchName: "editTextStyle",
dispatchParameter: "searchText",
isString: true,
key: "find",
},
firstlineindent: {
dispatchName: "editTextStyle",
dispatchParameter: "firstLineIndent",
dispatchParent: "textFeatures",
isUnit: true,
key: "firstlineindent",
},
fontname: {
dispatchName: "editTextStyle",
dispatchParameter: "fontName",
dispatchParent: "textFeatures",
isString: true,
key: "fontname",
},
fontsize: {
dispatchName: "editTextStyle",
dispatchParameter: "fontSize",
dispatchParent: "textFeatures",
isUnit: true,
// TODO look into large scale docs
key: "fontsize",
},
justification: {
dispatchName: "editTextStyle",
dispatchParameter: "justification",
dispatchParent: "textFeatures",
isString: true,
key: "justification",
kString: "justification",
},
leading: {
dispatchName: "editTextStyle",
dispatchParameter: "leading",
dispatchParent: "textFeatures",
isUnit: true,
// TODO look into large scale docs
key: "leading",
},
lefttoright: {
dispatchName: "editTextStyle",
dispatchParameter: "leftToRight",
dispatchParent: "textFeatures",
isBoolean: true,
key: "lefttoright",
},
mode: {
dispatchName: "editTextStyle",
dispatchParameter: "mode",
isNumber: true,
key: "mode",
kString: "findMode",
},
newstyle: {
// TODO think about this!
dispatchName: "editTextStyle",
dispatchParameter: "newStyle",
dispatchParent: "newStyle",
isObject: true,
key: "newstyle",
},
paragraphstyle: {
dispatchName: "editTextStyle",
dispatchParameter: "paraStyle",
dispatchParent: "textFeatures",
key: "paragraphstyle",
},
position: {
dispatchName: "editTextStyle",
dispatchParameter: "baselineOption",
dispatchParent: "textFeatures",
key: "position",
kString: "position",
},
replace: {
dispatchName: "editTextStyle",
dispatchParameter: "replace",
key: "replace",
},
tagsearch: {
dispatchName: "editTextStyle",
dispatchParameter: "tagSearch",
key: "tagsearch",
},
strikethrough: {
dispatchName: "editTextStyle",
dispatchParameter: "strikethrough",
dispatchParent: "textFeatures",
isBoolean: true,
key: "strikethrough",
},
strokecolor: {
dispatchName: "editTextStyle",
dispatchParameter: "strokeColor",
dispatchParent: "textFeatures",
key: "strokecolor",
},
strokejoin: {
dispatchName: "editTextStyle",
dispatchParameter: "strokeJoin",
dispatchParent: "textFeatures",
isString: true,
key: "strokejoin",
},
strokewidth: {
dispatchName: "editTextStyle",
dispatchParameter: "strokeWidth",
dispatchParent: "textFeatures",
isUnit: true,
key: "strokewidth",
},
textfeatures: {
dispatchName: "editTextStyle",
dispatchParameter: "textFeatures",
// TODO think about this!
dispatchParent: "textFeatures",
isObject: true,
key: "textfeatures",
},
underline: {
dispatchName: "editTextStyle",
dispatchParameter: "underline",
dispatchParent: "textFeatures",
isBoolean: true,
key: "underline",
},
},