@spearly/cms-js-core
TypeScript icon, indicating that this package has built-in type declarations

1.0.18 • Public • Published

日本語

Spearly CMS JS Core module

Feature

  • Generate converted html string from specified html template string.
  • Fetch content data.

Concept : DO NOT MANIPULATE THE DOM

  • This module SHOULD NOT use Browser DOM Manipulation.
    • This module should out of DOM world.
    • This module should use pure JavaScript.
    • Internally, this core library use html parser in order to search sub-loop element.

Spec

generateContent

generateContent will generate the one content html string from fetched data.

Params:

  • templateHtml : template html string which using generate the html. This html string SHOULD NOT contain cms-item attributes. This mean that pass the innerHTML of element which has cms-item.
  • contentId : Specify the content id want to fetch. or You can specify alias id.

Return:

  • Generated content as html string.

Error:

  • Throws Error when generator doesn't fetch or convert.

Readme

Keywords

none

Package Sidebar

Install

npm i @spearly/cms-js-core

Weekly Downloads

44

Version

1.0.18

License

MIT

Unpacked Size

57.5 kB

Total Files

15

Last publish

Collaborators

  • qst-exe
  • mantaroh
  • akoarum