Skip to content
This repository has been archived by the owner on Sep 20, 2020. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: MO-Movia/licit-fork
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.0.1
Choose a base ref
...
head repository: MO-Movia/licit-fork
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Jul 14, 2020

  1. bump for next

    melgish committed Jul 14, 2020
    Copy the full SHA
    9510c20 View commit details

Commits on Jul 17, 2020

  1. Fix collab server formidable (#53)

    * 1. Issue fix :"TypeError: r is not a function" shows when run collab server
    
    * FIX: Errors with formidable when bundling collab server.
    
    * FIX: CORS error on image upload
    
    * Fixes:
    1. Saving file not happening.
    2. Not returning image on GET call.
    
    * Fix for IRAD-901: New collab server reusing base PM collab server to resolve collaboration inconsistencies.
    
    * 1. "saveimage" functionality in Upload image is moved from build_web_server to a separate server.
    
    * FIX: Unable to upload image with  fully qualified Url
    
    * 1. Replaced chanzuckerberg/prosemirror-tables with ProseMirror/prosemirror-tables.
    2. Fix : Licit editor tollbar poorly configured.
    3. Modified README.md file to include commands to
    run image server for upload image.
    
    * New Image Server to deal image upload. Solved CORS issues.
    
    * 1. Licit Editor - Cannot reference image using fully qualified URL
    2. Licit Editor - Editor allows changing font sizes when disabled
    3. Licit Editor - Horizontal Line button is not greyed out when editor is disabled.
    
    * 1. Run Image server using bundle.
    2. Use cors package instead of our own cors handling in image server where express is used.
    
    * Flow type checker in Collab & Image server.
    
    * Do type checking only in development mode.
    
    Co-authored-by: Ashfaq Shamsudeen <ashfaq.shamsudeen@firmusoft.co.in>
    Co-authored-by: arathy <arathy.gopal@firmusoft.co.in>
    Co-authored-by: seybi.ea <seybi.ea@firmusoft.co.in>
    4 people authored Jul 17, 2020
    Copy the full SHA
    ab1aa51 View commit details

Commits on Jul 21, 2020

  1. Update README.md

    mdgilger authored Jul 21, 2020
    Copy the full SHA
    1703920 View commit details

Commits on Aug 20, 2020

  1. Dynamic plugin (#56)

    * Show all flow errors in the console.
    
    * FIX for IRAD-1010: With the latest webpack & exports-loader options have been changed.
    
    * Fix:Flow validation error reduced to 148
    
    * Fix: Image Inconcistancy issue and Flow validation errors
    
    * 1. Fix for IRAD-1010: Moved generate export default MathQuill from webpack config to source, so that package could load fine with other application as well. Depends on exports-loader.
    2. To delete the tarball file updated package with the new name.
    3. Updated README to include scripts to load jQuery first so that MathQuill loads fine.
    
    * 1. Updated README for:
      a. Changed the packed licit file name licit-0.0.1.tgz to modusoperandi-licit-0.0.2-0.tgz
      b. Changed the package name in import { Licit } from 'licit'; to import { Licit } from "@modusoperandi/licit";
    2. FIX: If we didn't specify the onChange or onReady event handlers, then the editor gives a run time error (err: noop is not defined)
    3. Changed uploadImage Promise to take care of these issues:
      1. Even if an image upload finishes in 700ms, it will take 3s for resolving the promise.
      2. If the image upload takes more than 3s, then the promise will be incorrectly resolved before completing the upload.
    
    * Updating default LicitRunTime's ImageUpload with correct Promise.
    
    * Fix:Reduced flow errors to 24
    
    * FIX: Document attribute updates collaboratively not working after the latest PM core updates.
    
    * FIX: Document attribute updates collaboratively not working after the latest PM core updates.
    
    * FIX: Document attribute updates collaboratively not working after the latest PM core updates.
    
    * Fix: Flow validation error fix completed
    
    * Fix for IRAD-1023.
    
    * Fix:Invalid file path error
    
    * Fix:flow error fix
    
    * 1.Handled dynamic plugin loading.
    2.Fixed list menu item disable issue on selecting document using Ctr+A
    
    * 1.set plugin propery to null.
    2.included licit folder in flowconfig.
    
    * Updated Readme.md
    
    * Made cliient http pubilc to acces from outside
    
    * Fix: Compilation error in licit component because of invalid imports in LicitRuntime
    
    * Path change due to module name changed from licit to @modusoperandi/licit.
    
    Co-authored-by: Ashfaq Shamsudeen <ashfaq.shamsudeen@firmusoft.co.in>
    Co-authored-by: seybi.ea <seybi.ea@firmusoft.co.in>
    3 people authored Aug 20, 2020
    Copy the full SHA
    f90fea1 View commit details

Commits on Aug 21, 2020

  1. Copy the full SHA
    e6af015 View commit details

Commits on Sep 1, 2020

  1. 0.0.2 (#58)

    melgish authored Sep 1, 2020
    Copy the full SHA
    cf71973 View commit details

Commits on Sep 3, 2020

  1. Fix update plugin schema (#60)

    * IRAD-1040:Update effective schema in collab server
    
    * Fix: avoid error in update schema method in non collaborative mode.
    
    * Update Collab server with the effective schema.
    
    Co-authored-by: seybi.ea <seybi.ea@firmusoft.co.in>
    Co-authored-by: Ashfaq Shamsudeen <ashfaq.shamsudeen@firmusoft.co.in>
    3 people authored Sep 3, 2020
    Copy the full SHA
    44c4de0 View commit details
  2. 0.0.3

    melgish committed Sep 3, 2020
    Copy the full SHA
    b1a6923 View commit details

Commits on Sep 4, 2020

  1. Copy the full SHA
    1ea8c92 View commit details

Commits on Sep 7, 2020

  1. Copy the full SHA
    71871bb View commit details

Commits on Sep 8, 2020

  1. Copy the full SHA
    d3d744b View commit details
  2. Copy the full SHA
    2b67ea4 View commit details

Commits on Sep 10, 2020

  1. FIX for IRAD-1060: Observe the editorview's dom insteadof root docume…

    …nt so that if multiple instances of editor in a page shouldn't cross-talk.
    ashfaq-shamsudeen committed Sep 10, 2020
    Copy the full SHA
    53ed5f1 View commit details
  2. Copy the full SHA
    5eefa28 View commit details

Commits on Sep 15, 2020

  1. Copy the full SHA
    51ddc48 View commit details

Commits on Sep 16, 2020

  1. Copy the full SHA
    3ea2c20 View commit details

Commits on Sep 17, 2020

  1. 1.Renamed attribute objectId.

    2.Added a property fitToContent in Licit for  editor fit content behaviour
    Seybi-ea committed Sep 17, 2020
    Copy the full SHA
    b01fe95 View commit details
  2. Readme updated

    Seybi-ea committed Sep 17, 2020
    Copy the full SHA
    caebc09 View commit details

Commits on Sep 19, 2020

  1. Updated PM version

    Seybi-ea committed Sep 19, 2020
    Copy the full SHA
    a9ed648 View commit details
  2. Copy the full SHA
    0b04e8e View commit details
  3. Readme updated

    Seybi-ea committed Sep 19, 2020
    Copy the full SHA
    9638163 View commit details
  4. Fix offline cdn (#64)

    * Handled mal-formed JSON
    
    * Fix for IRAD-1061: Now fonts loaded locally, so that it work in closed network as well.
    
    * 1. Include custom styles in Tool bar - IRAD-1042
    2. Display the selected custom styles - IRAD-1043
    
    Co-authored-by: seybi.ea <seybi.ea@firmusoft.co.in>
    Co-authored-by: Ashfaq Shamsudeen <ashfaq.shamsudeen@firmusoft.co.in>
    Co-authored-by: arathy <arathy.gopal@firmusoft.co.in>
    4 people authored Sep 19, 2020
    Copy the full SHA
    ac534c0 View commit details
Showing with 8,072 additions and 1,615 deletions.
  1. +2 −2 .flowconfig
  2. +24 −7 README.md
  3. +7 −0 build_image_server.py
  4. +2 −1 fix_pm_tables_dist.js
  5. +5 −0 flow-typed/flatted.js
  6. +5 −0 flow-typed/jquery.js
  7. +5 −0 flow-typed/mathquill.js
  8. +5 −0 flow-typed/prosemirror-collab.js
  9. +5 −0 flow-typed/prosemirror-commands.js
  10. +5 −0 flow-typed/prosemirror-dropcursor.js
  11. +5 −0 flow-typed/prosemirror-gapcursor.js
  12. +5 −0 flow-typed/prosemirror-history.js
  13. +5 −0 flow-typed/prosemirror-inputrules.js
  14. +5 −0 flow-typed/prosemirror-keymap.js
  15. +5 −0 flow-typed/prosemirror-model.js
  16. +5 −0 flow-typed/prosemirror-state.js
  17. +5 −0 flow-typed/prosemirror-tables.js
  18. +5 −0 flow-typed/prosemirror-transform.js
  19. +5 −0 flow-typed/prosemirror-utils.js
  20. +5 −0 flow-typed/prosemirror-view.js
  21. +5 −0 flow-typed/resize-observer-polyfill.js
  22. +5 −0 flow-typed/uuid.js
  23. +47 −39 licit/client/CustomLicitRuntime.js
  24. +14 −6 licit/client/index.js
  25. +0 −200 licit/server/LicitCollabController.js
  26. +0 −213 licit/server/LicitCollabServer.js
  27. +0 −10 licit/server/LicitDocChangeModel.js
  28. +0 −12 licit/server/LicitDocModel.js
  29. +0 −10 licit/server/LicitDocRevisionModel.js
  30. +0 −31 licit/server/assertion.js
  31. +214 −0 licit/server/collab/instance.js
  32. +58 −0 licit/server/collab/route.js
  33. +271 −0 licit/server/collab/server.js
  34. +13 −0 licit/server/collab/start.js
  35. +0 −149 licit/server/createModelClass.js
  36. +50 −0 licit/server/image/start.js
  37. +0 −12 licit/server/runLicitCollabServer.js
  38. +277 −299 package-lock.json
  39. +12 −8 package.json
  40. +6 −7 run_collab_server.py
  41. +20 −0 run_image_server.py
  42. +5 −2 src/BulletListNodeSpec.js
  43. +2 −2 src/CZIProseMirror.js
  44. +1 −1 src/ContentPlaceholderPlugin.js
  45. +181 −0 src/CustomStyleCommand.js
  46. +50 −0 src/CustomStyleMarkSpec.js
  47. +1 −1 src/DocLayoutCommand.js
  48. +3 −0 src/EditorMarks.js
  49. +1 −2 src/EditorSchema.js
  50. +1 −1 src/FontTypeCommand.js
  51. +12 −5 src/FontTypeMarkSpec.js
  52. +1 −1 src/HTMLMutator.js
  53. +48 −0 src/HeadingNodeSpec.js
  54. +2 −2 src/ImageFromURLCommand.js
  55. +15 −13 src/ImageNodeSpec.js
  56. +17 −18 src/ImageSourceCommand.js
  57. +6 −6 src/ImageUploadCommand.js
  58. +1 −1 src/LinkSetURLCommand.js
  59. +10 −9 src/ListToggleCommand.js
  60. +1 −0 src/MarkNames.js
  61. +2 −2 src/MathEditCommand.js
  62. +6 −2 src/OrderedListNodeSpec.js
  63. +18 −12 src/ParagraphNodeSpec.js
  64. +19 −4 src/SetDocAttrStep.js
  65. +2 −2 src/TableBackgroundColorCommand.js
  66. +2 −2 src/TableBorderColorCommand.js
  67. +2 −2 src/TableCellColorCommand.js
  68. +12 −8 src/TableCellMenuPlugin.js
  69. +26 −15 src/TableInsertCommand.js
  70. +12 −9 src/TableNodesSpecs.js
  71. +29 −10 src/TableResizePlugin.js
  72. +2 −2 src/TextColorCommand.js
  73. +1 −1 src/TextHighlightCommand.js
  74. +1 −1 src/TextInsertTabSpaceCommand.js
  75. +1 −1 src/Types.js
  76. +8 −9 src/buildEditorPlugins.js
  77. +4 −0 src/clearMarks.js
  78. +16 −7 src/client/CollabConnector.js
  79. +51 −35 src/client/EditorConnection.js
  80. +60 −11 src/client/Licit.js
  81. +47 −44 src/client/LicitRuntime.js
  82. +7 −1 src/client/SimpleConnector.js
  83. +3 −2 src/client/http.js
  84. +1 −1 src/client/throttle.js
  85. +31 −7 src/convertFromJSON.js
  86. +356 −0 src/fonts.css
  87. BIN src/fonts/Aclonica.woff2
  88. BIN src/fonts/Acme.woff2
  89. BIN src/fonts/Alegreya-Regular-C.woff2
  90. BIN src/fonts/Alegreya-Regular-CE.woff2
  91. BIN src/fonts/Alegreya-Regular-G.woff2
  92. BIN src/fonts/Alegreya-Regular-GE.woff2
  93. BIN src/fonts/Alegreya-Regular-L.woff2
  94. BIN src/fonts/Alegreya-Regular-LE.woff2
  95. BIN src/fonts/Alegreya-Regular-V.woff2
  96. BIN src/fonts/ArialBlack-G.woff2
  97. BIN src/fonts/ArialBlack-L.woff2
  98. BIN src/fonts/ArialBlack-LE.woff2
  99. BIN src/fonts/CourierNew-L.woff2
  100. BIN src/fonts/Georgia-C.woff2
  101. BIN src/fonts/Georgia-CE.woff2
  102. BIN src/fonts/Georgia-G.woff2
  103. BIN src/fonts/Georgia-GE.woff2
  104. BIN src/fonts/Georgia-L.woff2
  105. BIN src/fonts/Georgia-LE.woff2
  106. BIN src/fonts/Tahoma-C.woff2
  107. BIN src/fonts/Tahoma-CE.woff2
  108. BIN src/fonts/Tahoma-G.woff2
  109. BIN src/fonts/Tahoma-GE.woff2
  110. BIN src/fonts/Tahoma-L.woff2
  111. BIN src/fonts/Tahoma-LE.woff2
  112. BIN src/fonts/Times-L.woff2
  113. BIN src/fonts/Times-LE.woff2
  114. BIN src/fonts/TimesNewRoman-C.woff2
  115. BIN src/fonts/TimesNewRoman-CE.woff2
  116. BIN src/fonts/TimesNewRoman-G.woff2
  117. BIN src/fonts/TimesNewRoman-GE.woff2
  118. BIN src/fonts/TimesNewRoman-L.woff2
  119. BIN src/fonts/TimesNewRoman-LE.woff2
  120. BIN src/fonts/TimesNewRoman-V.woff2
  121. BIN src/fonts/Verdana-C.woff2
  122. BIN src/fonts/Verdana-CE.woff2
  123. BIN src/fonts/Verdana-G.woff2
  124. BIN src/fonts/Verdana-GE.woff2
  125. BIN src/fonts/Verdana-L.woff2
  126. BIN src/fonts/Verdana-LE.woff2
  127. BIN src/fonts/Verdana-V.woff2
  128. +6 −10 src/index.js
  129. +1 −1 src/patchStyleElements.js
  130. +4 −0 src/rebaseDocWithSteps.js
  131. +30 −9 src/toggleList.js
  132. +5 −1 src/transformAndPreserveTextSelection.js
  133. +69 −0 src/ui/AlertInfo.js
  134. +3 −3 src/ui/BookmarkNodeView.js
  135. +2 −2 src/ui/ColorEditor.js
  136. +4 −4 src/ui/CommandButton.js
  137. +4 −4 src/ui/CommandMenu.js
  138. +2 −2 src/ui/CommandMenuButton.js
  139. +2 −2 src/ui/CustomButton.js
  140. +1 −1 src/ui/CustomEditorView.js
  141. +3 −3 src/ui/CustomMenu.js
  142. +5 −5 src/ui/CustomMenuItem.js
  143. +6 −3 src/ui/CustomNodeView.js
  144. +3 −3 src/ui/CustomRadioButton.js
  145. +23 −22 src/ui/DocLayoutEditor.js
  146. +12 −4 src/ui/Editor.js
  147. +20 −7 src/ui/EditorFrameset.js
  148. +2 −2 src/ui/EditorToolbar.js
  149. +30 −38 src/ui/EditorToolbarConfig.js
  150. +5 −2 src/ui/FontSizeCommandMenuButton.js
  151. +5 −2 src/ui/FontTypeCommandMenuButton.js
  152. +2 −2 src/ui/Frag.js
  153. +81 −0 src/ui/HeadingCommandMenuButton.js
  154. +12 −6 src/ui/Icon.js
  155. +2 −2 src/ui/ImageAlignEditor.js
  156. +2 −2 src/ui/ImageInlineEditor.js
  157. +2 −2 src/ui/ImageNodeView.js
  158. +10 −10 src/ui/ImageResizeBox.js
  159. +4 −4 src/ui/ImageURLEditor.js
  160. +3 −3 src/ui/ImageUploadEditor.js
  161. +5 −5 src/ui/LinkTooltip.js
  162. +5 −5 src/ui/LinkURLEditor.js
  163. +2 −2 src/ui/LoadingIndicator.js
  164. +13 −11 src/ui/MathEditor.js
  165. +8 −8 src/ui/MathInlineEditor.js
  166. +11 −3 src/ui/MathNodeView.js
  167. +14 −14 src/ui/PointerSurface.js
  168. +9 −9 src/ui/PopUp.js
  169. +17 −17 src/ui/PopUpManager.js
  170. +1 −1 src/ui/ResizeObserver.js
  171. +8 −6 src/ui/RichTextEditor.js
  172. +5 −5 src/ui/SelectionObserver.js
  173. +3 −3 src/ui/TableCellMenu.js
  174. +7 −5 src/ui/TableGridSizeEditor.js
  175. +3 −3 src/ui/TableNodeView.js
  176. +3 −3 src/ui/TooltipSurface.js
  177. +3 −3 src/ui/UICommand.js
  178. +1 −1 src/ui/createPopUp.js
  179. +5 −1 src/ui/czi-editor-frameset.css
  180. +3 −1 src/ui/czi-editor-toolbar.css
  181. +16 −1 src/ui/czi-editor.css
  182. +22 −0 src/ui/czi-form.css
  183. +15 −10 src/ui/czi-icon.css
  184. +39 −0 src/ui/findActiveCustomStyle.js
  185. +25 −0 src/ui/findActiveHeading.js
  186. BIN src/ui/fonts/KaTeX_AMS-Regular.ttf
  187. BIN src/ui/fonts/KaTeX_AMS-Regular.woff
  188. BIN src/ui/fonts/KaTeX_AMS-Regular.woff2
  189. BIN src/ui/fonts/KaTeX_Caligraphic-Bold.ttf
  190. BIN src/ui/fonts/KaTeX_Caligraphic-Bold.woff
  191. BIN src/ui/fonts/KaTeX_Caligraphic-Bold.woff2
  192. BIN src/ui/fonts/KaTeX_Caligraphic-Regular.ttf
  193. BIN src/ui/fonts/KaTeX_Caligraphic-Regular.woff
  194. BIN src/ui/fonts/KaTeX_Caligraphic-Regular.woff2
  195. BIN src/ui/fonts/KaTeX_Fraktur-Bold.ttf
  196. BIN src/ui/fonts/KaTeX_Fraktur-Bold.woff
  197. BIN src/ui/fonts/KaTeX_Fraktur-Bold.woff2
  198. BIN src/ui/fonts/KaTeX_Fraktur-Regular.ttf
  199. BIN src/ui/fonts/KaTeX_Fraktur-Regular.woff
  200. BIN src/ui/fonts/KaTeX_Fraktur-Regular.woff2
  201. BIN src/ui/fonts/KaTeX_Main-Bold.ttf
  202. BIN src/ui/fonts/KaTeX_Main-Bold.woff
  203. BIN src/ui/fonts/KaTeX_Main-Bold.woff2
  204. BIN src/ui/fonts/KaTeX_Main-BoldItalic.ttf
  205. BIN src/ui/fonts/KaTeX_Main-BoldItalic.woff
  206. BIN src/ui/fonts/KaTeX_Main-BoldItalic.woff2
  207. BIN src/ui/fonts/KaTeX_Main-Italic.ttf
  208. BIN src/ui/fonts/KaTeX_Main-Italic.woff
  209. BIN src/ui/fonts/KaTeX_Main-Italic.woff2
  210. BIN src/ui/fonts/KaTeX_Main-Regular.ttf
  211. BIN src/ui/fonts/KaTeX_Main-Regular.woff
  212. BIN src/ui/fonts/KaTeX_Main-Regular.woff2
  213. BIN src/ui/fonts/KaTeX_Math-BoldItalic.ttf
  214. BIN src/ui/fonts/KaTeX_Math-BoldItalic.woff
  215. BIN src/ui/fonts/KaTeX_Math-BoldItalic.woff2
  216. BIN src/ui/fonts/KaTeX_Math-Italic.ttf
  217. BIN src/ui/fonts/KaTeX_Math-Italic.woff
  218. BIN src/ui/fonts/KaTeX_Math-Italic.woff2
  219. BIN src/ui/fonts/KaTeX_SansSerif-Bold.ttf
  220. BIN src/ui/fonts/KaTeX_SansSerif-Bold.woff
  221. BIN src/ui/fonts/KaTeX_SansSerif-Bold.woff2
  222. BIN src/ui/fonts/KaTeX_SansSerif-Italic.ttf
  223. BIN src/ui/fonts/KaTeX_SansSerif-Italic.woff
  224. BIN src/ui/fonts/KaTeX_SansSerif-Italic.woff2
  225. BIN src/ui/fonts/KaTeX_SansSerif-Regular.ttf
  226. BIN src/ui/fonts/KaTeX_SansSerif-Regular.woff
  227. BIN src/ui/fonts/KaTeX_SansSerif-Regular.woff2
  228. BIN src/ui/fonts/KaTeX_Script-Regular.ttf
  229. BIN src/ui/fonts/KaTeX_Script-Regular.woff
  230. BIN src/ui/fonts/KaTeX_Script-Regular.woff2
  231. BIN src/ui/fonts/KaTeX_Size1-Regular.ttf
  232. BIN src/ui/fonts/KaTeX_Size1-Regular.woff
  233. BIN src/ui/fonts/KaTeX_Size1-Regular.woff2
  234. BIN src/ui/fonts/KaTeX_Size2-Regular.ttf
  235. BIN src/ui/fonts/KaTeX_Size2-Regular.woff
  236. BIN src/ui/fonts/KaTeX_Size2-Regular.woff2
  237. BIN src/ui/fonts/KaTeX_Size3-Regular.ttf
  238. BIN src/ui/fonts/KaTeX_Size3-Regular.woff
  239. BIN src/ui/fonts/KaTeX_Size3-Regular.woff2
  240. BIN src/ui/fonts/KaTeX_Size4-Regular.ttf
  241. BIN src/ui/fonts/KaTeX_Size4-Regular.woff
  242. BIN src/ui/fonts/KaTeX_Size4-Regular.woff2
  243. BIN src/ui/fonts/KaTeX_Typewriter-Regular.ttf
  244. BIN src/ui/fonts/KaTeX_Typewriter-Regular.woff
  245. BIN src/ui/fonts/KaTeX_Typewriter-Regular.woff2
  246. +10 −0 src/ui/icon-font.css
  247. BIN src/ui/icon-font/MaterialIcons-Regular.ttf
  248. +1 −1 src/ui/injectStyleSheet.js
  249. +1 −0 src/ui/katex.min.css
  250. +26 −14 src/ui/mathquill-editor/MathQuillEditor.js
  251. +2 −2 src/ui/mathquill-editor/MathQuillEditorSymbolsPanel.js
  252. BIN src/ui/mathquill-editor/font/Symbola.eot
  253. BIN src/ui/mathquill-editor/font/Symbola.otf
  254. +5,102 −0 src/ui/mathquill-editor/font/Symbola.svg
  255. BIN src/ui/mathquill-editor/font/Symbola.ttf
  256. BIN src/ui/mathquill-editor/font/Symbola.woff
  257. BIN src/ui/mathquill-editor/font/Symbola.woff2
  258. +1 −0 src/ui/mathquill-editor/mathquill.min.css
  259. +1 −1 src/ui/preventEventDefault.js
  260. +8 −2 src/ui/renderLaTeXAsHTML.js
  261. +11 −8 src/ui/resolveImage.js
  262. +72 −0 utils/build_image_server.js
  263. +29 −7 utils/build_licit_collab_server.js
  264. +1 −31 utils/build_web_server.js
  265. +15 −11 webpack.config.js
4 changes: 2 additions & 2 deletions .flowconfig
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[include]
.*/src/.*
.*/demo/.*

.*/licit/.*
[ignore]
.*/dist/.*
.*/bin/.*
.*/node_modules/@babel.*
.*/node_modules/@emotion/.*
31 changes: 24 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -10,9 +10,6 @@






<h1 align="center">Licit Editor</h1>

<div align="center">
@@ -83,6 +80,15 @@ To run collab server:
python run_collab_server.py
```

### Start the image server for Upload image
```
In Windows
py run_image_server.py
In MacOS/Linux
python run_image_server.py
```

### Start the web server

```
@@ -109,17 +115,17 @@ For using licit in your project you should follow these steps:
npm pack
```

Now you will find a *licit-0.0.1.tgz* file in the licit directory.
Now you will find a *modusoperandi-licit-0.0.2.tgz* file in the licit directory.

Add this *.tgz* file to your own angular project and install it using the below command:
```
# At your angular working directory
npm install ./licit-0.0.1.tgz
npm install ./modusoperandi-licit-0.0.2.tgz
```

**After this you can import licit component in your application like:**
```
import { Licit } from 'licit';
import { Licit } from '@modusoperandi/licit';
import * as React from 'react';
import * as ReactDOM from 'react-dom';
@@ -153,11 +159,13 @@ Please refer *licit\client\index.js* for getting more detailed idea on passing p
| data |Document data to be loaded into the editor|null
| disabled|To disable the editor|false
| embedded|To disable/enable inline behavior of the editor|false
| fitToContent|To disable/enable fit to content behavior of the editor|false
| runtime|To pass runtime to the editor. No value means default EditorRuntime | Expects a post method '*saveimage?fn=*' in the server with input parameters *File name and File object*, and this post method parse the form data and return response in JSON format (*{id: string, height: < height of the image>, src: <relative/full_path_of_the_image>, width: < width_of_the_image>}*). Please refer *licit\utils\build_web_server.js* for '*saveimage*' method sample.
| plugins| Array of prosemirror plugin object to pass external prosemirror plugins to the editor. No value means no external plugins | Expects a method '*getEffectiveSchema*' in the prosemirror plugin object that returns new schema object which is the effective schema modified with the current editor schema, that is passed as the input parameter to this method.

|Event Name| Description|Parameter|
|--|--|--|
|onChange | Fires after each significant change |data
|onChange | Fires after each significant change |<ul><li>data</li><li>isEmpty</li></ul>
|onReady| Fires once when the editor is ready |licit reference


@@ -170,8 +178,17 @@ OR
in the default global CSS file *src\styles.scss*, add
*@import "~licit/dist/styles.css"*


MathQuill requires jQuery 1.5.2+ to be loaded first:
In *angular.json*, add
*"scripts": [
"node_modules/jquery/dist/jquery.min.js",
]*

Run *npm start* to see the licit editor inside the angular application.

Note: there is a nice Angular test app designed to test the component interface of licit here: https://github.com/melgish/licit-playground - which also allows you to load and save the JSON file.

## Use it for your own project

For using licit in your project you should follow these steps:
7 changes: 7 additions & 0 deletions build_image_server.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import os

os.system('node utils/build_image_server.js')
print("Completed")
3 changes: 2 additions & 1 deletion fix_pm_tables_dist.js
Original file line number Diff line number Diff line change
@@ -14,7 +14,8 @@ var found = false;

found = fs.existsSync(pmtDir);
if(!found) {
pmtDir = path.resolve(cwd, "../prosemirror-tables");
// New path is @modusoperandi/licit
pmtDir = path.resolve(cwd, "../../prosemirror-tables");
found = fs.existsSync(pmtDir);
}

5 changes: 5 additions & 0 deletions flow-typed/flatted.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// @flow

declare module 'flatted' {
declare module.exports: any;
}
5 changes: 5 additions & 0 deletions flow-typed/jquery.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// @flow

declare module 'jquery' {
declare module.exports: any;
}
5 changes: 5 additions & 0 deletions flow-typed/mathquill.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// @flow

declare module 'exports-loader?exports=default|MathQuill&type=module!node-mathquill/build/mathquill.js' {
declare module.exports: any;
}
5 changes: 5 additions & 0 deletions flow-typed/prosemirror-collab.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// @flow

declare module 'prosemirror-collab' {
declare module.exports: any;
}
5 changes: 5 additions & 0 deletions flow-typed/prosemirror-commands.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// @flow

declare module 'prosemirror-commands' {
declare module.exports: any;
}
5 changes: 5 additions & 0 deletions flow-typed/prosemirror-dropcursor.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// @flow

declare module 'prosemirror-dropcursor' {
declare module.exports: any;
}
5 changes: 5 additions & 0 deletions flow-typed/prosemirror-gapcursor.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// @flow

declare module 'prosemirror-gapcursor' {
declare module.exports: any;
}
5 changes: 5 additions & 0 deletions flow-typed/prosemirror-history.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// @flow

declare module 'prosemirror-history' {
declare module.exports: any;
}
5 changes: 5 additions & 0 deletions flow-typed/prosemirror-inputrules.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// @flow

declare module 'prosemirror-inputrules' {
declare module.exports: any;
}
5 changes: 5 additions & 0 deletions flow-typed/prosemirror-keymap.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// @flow

declare module 'prosemirror-keymap' {
declare module.exports: any;
}
5 changes: 5 additions & 0 deletions flow-typed/prosemirror-model.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// @flow

declare module 'prosemirror-model' {
declare module.exports: any;
}
5 changes: 5 additions & 0 deletions flow-typed/prosemirror-state.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// @flow

declare module 'prosemirror-state' {
declare module.exports: any;
}
5 changes: 5 additions & 0 deletions flow-typed/prosemirror-tables.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// @flow

declare module 'prosemirror-tables' {
declare module.exports: any;
}
5 changes: 5 additions & 0 deletions flow-typed/prosemirror-transform.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// @flow

declare module 'prosemirror-transform' {
declare module.exports: any;
}
5 changes: 5 additions & 0 deletions flow-typed/prosemirror-utils.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// @flow

declare module 'prosemirror-utils' {
declare module.exports: any;
}
5 changes: 5 additions & 0 deletions flow-typed/prosemirror-view.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// @flow

declare module 'prosemirror-view' {
declare module.exports: any;
}
5 changes: 5 additions & 0 deletions flow-typed/resize-observer-polyfill.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// @flow

declare module 'resize-observer-polyfill' {
declare module.exports: any;
}
5 changes: 5 additions & 0 deletions flow-typed/uuid.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// @flow

declare module 'uuid' {
declare module.exports: any;
}
86 changes: 47 additions & 39 deletions licit/client/CustomLicitRuntime.js
Original file line number Diff line number Diff line change
@@ -1,48 +1,56 @@
// @flow

// This implements the interface of `EditorRuntime`.

import type {ImageLike} from '../../src/Types';
import { GET, POST } from '../../src/client/http';
import type {
ImageLike
} from '../../src/Types';
import {
GET,
POST
} from '../../src/client/http';

class CustomLicitRuntime {

// Image Proxy
canProxyImageSrc(): boolean {
return false;
}

getProxyImageSrc(src: string): string {
// This simulate a fake proxy.
const suffix = 'proxied=1';
return src.indexOf('?') === -1 ? `${src}?${suffix}` : `${src}&${suffix}`
}

// Image Upload
canUploadImage(): boolean {
return true;
}

uploadImage(blob: Object): Promise<ImageLike> {
// Use uploaded image URL.
var img: ImageLike;
POST(window.location.hostname + ':3002/saveimage?fn='+blob.name, blob, 'application/octet-stream').then(data => {
img = JSON.parse(data);
}, err => {
img = {
id: '',
width: 0,
height: 0,
src: '',
}
});

return new Promise(resolve => {
setTimeout(() => {
resolve(img);
}, 3000);
});
}
// Image Proxy
canProxyImageSrc(): boolean {
return false;
}

getProxyImageSrc(src: string): string {
// This simulate a fake proxy.
const suffix = 'proxied=1';
return src.indexOf('?') === -1 ? `${src}?${suffix}` : `${src}&${suffix}`
}

// Image Upload
canUploadImage(): boolean {
return true;
}

uploadImage(blob: Object): Promise < ImageLike > {
var img: ImageLike;
// Note: While looking at the uploadImage() function, it is found that a promise is resolved blindly after 3 seconds. Is it a
// requirement? If not, then I think it causes two issues, 1. Even if an image upload finishes in 700ms, it will take 3s for
// resolving the promise. 2. If the image upload takes more than 3s, then the promise will be incorrectly resolved before
// completing the upload.
// The following structure may be good to solve the issue.
return new Promise((resolve, reject) => {
// Use uploaded image URL.
const url = window.location.protocol + "//" + window.location.hostname + ':3004/saveimage?fn=' + blob.name;
POST(url, blob, 'application/octet-stream').then(data => {
img = JSON.parse(data);
resolve(img);
}, err => {
img = {
id: '',
width: 0,
height: 0,
src: '',
};
resolve(img);
});
});
}
}

export default CustomLicitRuntime;
20 changes: 14 additions & 6 deletions licit/client/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading