Coder Social home page Coder Social logo

mesopelagique / mark4down Goto Github PK

View Code? Open in Web Editor NEW
6.0 2.0 2.0 499 KB

Realtime markdown editor for your 4D database.

Home Page: https://mesopelagique.github.io/Mark4Down

License: MIT License

Roff 0.68% 4D 39.66% HTML 15.55% JavaScript 27.20% CSS 9.69% Shell 7.21%
markdown 4d-database 4d-web-component 4d-component

mark4down's Introduction

Mark4Down

language language-top code-size release license discord

Realtime markdown editor for your 4D database.

  • Edit documentation from your local machine or remote device such as iPad.
  • The file is saved automatically. New file too.
  • See list of available, missing or orphan documentation files (toolbar buttons at the right)
  • Open github or see diff from last commit

preview

Quick install: Do the command described by install, then accept host database event in your database, re-start your database and finally open http://localhost:8349

Launch web server

This a web component. Your need to start a web server to deliver the component interface in your web browser.

Using the component web server

If do not want to pollute your database web server, a 4D component could provide one, since new 18R release.

There is two way to launch the component web server:

by accepting to execute On Host Database Event method of the component

In database setting, security tab, "Execute On Host Database Event ...

๐Ÿ’ก This is the easiest way to have an editor always ready for all your database by placing this component into your 4D app Components folder. See install section.

A web server for the component will be started when your database start and the default url will be http://localhost:8349 (as defined by component settings.4DSettings)

or by starting the component web server yourself

mark4downWebServer().start() //  you can choose options like HTTP port

Using your database web server

In On Web Connection method, if you want to edit file into your root database folder do

$markdown:=mark4down (Folder(fk database folder) ;$1;$2)
If (Not($markdown))
  // do other requests on your server
End if

with $1 and $2 parameters of On Web Connection database method.

You must copy WebFolder of component into your database or make a redirection and use WEB SEND FILE.

Then open your browser to see the web markdown editor

Install

In your 4D for all your databases

Just launch this command in terminal for macOS to install the lastest released version

curl -sL https://mesopelagique.github.io/Mark4Down/install.sh | sh

Or manually download and drag the component in your 4D Components/ folder (on macOS for instance /Applications/4D.app/Contents/Components/)

โš ๏ธ The component folder must be renamed to Mark4Down.4dbase if you use sources from github.

For one database

Drag the component in the Components folder into your database.

More

Add your own style

Go to WebFolder and add it to style.css file or add a link to a css file into Resources/editor.html

Access documentation files list without editor

Available

Go to /mark4down/list, ex: http://localhost:8349/mark4down/list

Missing

Go to /mark4down/missing, ex: http://localhost:8349/mark4down/missing

Full git diff

Go to /mark4down/diff, ex: http://localhost:8349/mark4down/diff/

Acknowledgment


mesopelagique

mark4down's People

Contributors

ayoubserti avatar e-marchand avatar mesopelagique avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.