Skip to content

How to use code/JavaScript fields? #133

Description

@bookin

I want to use JavaScript code in my Datasource/Connector but I am faced with two problems:

  • the javascript code isn't highlighting. Fields open the editor in the popup but it is just a text editor.
  • but the biggest problem - the text doesn't save to the datasource, when I re-open datasource or use export/objects API I don't see field with code that I saved
@Property(
            name = "someJsCode",
            title = "Some Script",
            description = "Some js function ",
            hints = {UIHints.CODE, UIHints.JAVASCRIPT}
    )
    @SchemaAnnotations.StringSchema
    String beforeRequestJSCode();

Do you have examples/explanations on how to use code fields?
Thanks

LucidWorks: 5.4.1
SDK: 4.0.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions