JavaScript knowledgebase, markdown wysiwyg (and back), image edit then export pdf - javascript

We have knowledgebase (must be available for adding/editing) and if we type %ASDF% it changes this to text defined in knowledgebase in template.
I'd like to use some WYSIWYG editor if there is a need to type something manually to the report (not neccessary markdown) BUT what library/script will allow me to insert and manipulate photo (crop/resize, blur, etc) and then place it wherever I want on report by dragging and dropping (just like MS Word)?
After everything done report will be exported to PDF but i'll find some js library or other way to do that.
What will be the best framework to write this? node.js? Angular? PHP+Laravel+JS libraries? Ruby on Rails (no experience at all with ruby)? Point me please.

Related

Offline report with D3, md and equations

Is it possible to create a single html page containing embedded D3js charts, CommonMark text, and equations (e.g. Katex or MathJax) and have it all rendered the browser offline?
Must have:
Works offline using modern Firefox/Chrome/Safari, after having
downloaded a minimal number of JavaScript libs.
No requirement for installing anything beyond the web browser. So no local http server, Pandoc, R, Python etc.
Should have:
Possible to write everything in a single html file, which opens in a normal modern browser.
Good archival properties with minimal maintanence.
Motivation:
We work in a high security locked down IT environment and can’t install stuff, but we do have decent web browsers and can run javascript in them.
We routinely share small analytical reports internally, and are experimenting with delivering a directory containing
an html file (with embedded JSON data), and
downloaded D3 and Underscore librariess
All the internal customer has to do is click on index.html. So far this has been very succesful, but we'd like to use markdown and equations too.
We are vaguely aware of data science workbook solutions like Jupyter and Observable, but not sure that these meet our criteria.
Clarification
I know we can download libs and place them in a dir alongside index.html, but I'm not sure if a JavaScript library exists which can render the markdown and equations and write the results directly into the DOM. And even if such a library exists, where in index.html would the markdown be written? Is there some kind of html tag which can just hide a load of raw text which will be parsed by JS?
To answer your question, it is possible. You'll either need Node app that will render static HTML pages or simple HTML page with embedded Javascript. Since all these libraries are available as UDM packages, I suggest 2nd option.
CommonMark CDN: https://cdnjs.com/libraries/commonmark
KaTeX CDN: https://khan.github.io/KaTeX/docs/browser.html
You'll only need to download these libraries and include them in page. KaTeX includes JS to convert simple text to rendered mathematical equation, you only need to give it text and element where to render equation: https://khan.github.io/KaTeX/docs/api.html. CommonMark is similar but it only gives you rendered HTML, you need to insert it with element.innerHTML yourself: https://www.npmjs.com/package/commonmark.

Automate exporting images from Dynamic image file

I am going to create a postal card (i don't know which one is better photoshop, After effects or ...). i want it to be dynamic. I mean using some config file(text or json or ...) next to it, provide the value of the dynamic layers and properties. then apply the config file to the postal card file from outside of the application, using a script. is it possible?
1- which one is better photoshop, After effects or illustrator or ...?
2- how should be the main script that applies the configuration file to the postal card file? javascript? C#? or sth else?
thank you very much
I would use InDesign: itcan be scripted and has useful custom "templates" through Master Pages. It is also the Adobe product best suited for creating pdf files which is ideal for print. Photoshop is more for image manipulation, Illustrator is for vectors (often logos), and After Effects is for intense movie editing (special effects) -- so that won't help you very much.
Create your main script in javascript (because it is cross platform and well-known which means more people to answer your questions). Using javascript also helps to deal with transferring your data. You can use JSON to inject your data into the InDesign file.
This is possible, it just requires attention to detail.
Good luck!

Export JavaScript from PDF to external editor

How do I export the JavaScript source code of a pdf into an editor lets say atom or such? I have not been able to find the instructions of this online (only converting html to pdf and vice versa) I am just trying to export the JavaScript source code so that it is more easily readable. Has anyone ever done this before?
I agree that this question does not belong on StackOverflow, however, for the sake of helping out my fellow man:
If you want to export all of the JavaScript from a PDF to an external editor: go into the Preferences Menu, and choose the JavaScript option:
From there, select the Use external JavaScript editor option, and set it to the Text editor of your choice.
The question does indeed not have much to do primarily with programming, and would better be moved to Superuser.
To answer directly to the question and the comment, you specify whether Acrobat's own or an external editor is used in the Javascript tab of the Preferences. There you also specify the application to act as external editor.

Web Based WYSIWYG Editor with Photo Upload support

Does anyone know what my options are for Web-based WYSIWYG editors (the type which acts like a textarea but produces HTML) are?
I need one with support for image uploads - This would be for a basic CMS that I am developing which needs to be fairly user-friendly. I can handle the server-side upload processing, but I need an upload option to be there.
A combination of CKEditor and CKFinder may have been ideal, but CKEditor seems to have been commercialised - I'm looking for something which is free/open source.
I think that this post belongs here... It was a tossup between stackoverflow and webmasters. Sorry if I'm wrong!
I use TinyMCE and there are several upload plugins that you can use with it, including these here.

Online RTE (Rich Text Editor) javascript library with data uri capability

I'm looking for a RTE javascript library (e.g. tinyMce) to allow user to create rich web content. I'm very keen to find one that is:
lightweight (not a must)
allow image upload that can transform binary data into "data uri", i'd like to embed uploaded images into the page that the user is editing. If this feature is not provided with any RTEs, please recommend one that may extend this function easily.
multiple languages support including asian languages.
preferrably work as a jQuery plug-in.
Please share your experience if you have done this before.

Categories