Skip to content

Examples on how to use form macros to copy style of form object and paste to another

License

Notifications You must be signed in to change notification settings

mesopelagique/CopyPasteStyleFormMacro

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CopyPasteStyleFormMacro

Examples to copy some style keys from one selected objet to another.

Screencast

Macro classes

List of macro defined here Project/Sources/FormMacros.json

Abtract class

  • FormMacro allow to share some functions between macro classes
  • StyleMacro allow to share some functions about style.

CopyStyle

CopyStyle copy selected object style into pasteboard using JSON format.

Not all style keys are copyed, a list of keys is here in code. More could be added, see todo (like background color...)

PasteStyle

PasteStyle get the style from pasteboard and apply to the selected element

SaveStyle

SaveStyle, select an object and provide a name to the style. It will saved in a share file (Folder:C1567(fk user preferences folder).file("styleMacro.json")) ad you could use later with next macro.

LoadStyle

LoadStyle: select an object and launch the macro. A menu will be shown to select one of the saved style to apply.

TODO

  • Apply the style to a list of selected elements (easy, you could PR if you implement it, my other macro do it)
  • More style keys
  • Instead of settings null, unset when pasting style if not defined

About

Examples on how to use form macros to copy style of form object and paste to another

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages

  • 4D 99.9%
  • CSS 0.1%