Commit Graph

12 Commits

Author SHA1 Message Date
Lee Holmes
5ffc026a28 This change adds several features to make it easier to write Markdown articles that desire server-based paths (such as /images/my_image.png).
1) There is now a new preference page under images for "Maintaining server paths". You specify a server path (such as /images/) and a local path (such as c:\hugo\static\images), and
Marktext will do the right mapping internally. Image previews will come from the images on your computer, while the content stored in the document will represent the corresponding server paths.
Full documentation has been added to IMAGES.md.
2) Path variables (like ${filename}) have been expanded to support year, month, and day. This helps prevent filename collisions and is common in many blogging platforms.
3) Pasting images and dragging them into Marktext supports this path mapping as well, moving them to the local path as appropriate
4) Image imports (pasting and or dragging) now retain the source image file name if possible, only using the image hash if there is a conflict. Images with names are easier to manage and show up
appropriately in search engines
4) The image edit dialog now has a 'Rename' tab so that you can rename the images to something more specific when they are just pasted from the clipboard. This simplifies the previous workflow that
used to require editing the markdown and renaming the file in the filesystem manually.

There is also now a 'User Notification Dialog' component to let Marktext communicate with the user about error conditions.
2024-01-19 18:42:50 -08:00
Felix Häusler
fed1dac48f
Fix XSS in HTML table paste content (#3002) 2022-02-18 18:01:25 +08:00
Kiyoka Nishiyama
92932a1869
fix: #703 invalidate image cache on demand (#2875) 2022-01-24 00:20:40 +01:00
Ran Luo
b4f9f44a9b
Optimization inline image (#1347)
* fix: Hide all float box and image transformer when context click

* fix: image need to have unique id

* feat: support copy,cut and paste selected image

* link to creator

* Feat: prevent drag image

* fix: #1313

* Fix: enter to edit selected image
2019-09-23 11:36:41 +08:00
Ran Luo
d26f509209
Feature: resize image and toggle inline and block image (#1335)
* Feature: size image

* Support edit and delete image

* render img tag by image render component

* Fix: can not recognize pencent symbal in img src

* Feat: align image

* Feat: align image

* add tooltip of image toolbar

* Update html tag regexp

* Fix: wrong class name

* Feat: resize image

* Some bug fix

* Fix: image loading status

* Fix: backspace error in image selector

* Remove: unused codes

* Add download event
2019-09-17 16:15:00 +08:00
Ran Luo
cb7be189cc
Feat: Support inline image and small image (#1318) 2019-09-03 22:56:46 +08:00
Ran Luo
46371f8c56
Update Babel to 7.x.x (#1253)
* update deps

* update babel

* add babel-runtime

* update config file

* update config file

* modify config

* modify some codes

* update some dependences

* Update allowed licenses validate
2019-09-01 03:30:01 +08:00
Ran Luo
1c489f095e remove unnecessary attrs (#1241) 2019-08-06 16:41:11 +02:00
Ran Luo
c239e99f1b
Refactor inline image to support paste/drop image (#1028)
* feat: image setting

* opti: inline image

* add imageSelectAction

* remove axios from muya

* update image selector

* finish image selector ui

* add load success style

* delete image by click delete icon

* opti structure of image html

* handle arrow key

* enter to edit

* image preview by press space

* handle backspace when the previous element is image wrapper

* update codes for change another PC

* emable select all in input

* handle arrow and backspace key

* create a new paragraph after the last paragraph if its not empty

* handle backspace when the previous element is image wrapper

* handle enter event in image selector

* rewrite auto show image selector

* modify image folder

* copy file to folder

* select image

* handle paste image

* picgo

* guess image path from clipboard

* drag and drop image to Mark Text

* add github uploader

* remove unused codes

* remove unused codes

* rewrite image path auto complete

* support `path` imageInsertAction

* doc: add image uploader doc

* remove debug codes

* set init value in image uploader page

* fix typo

* remove unused codes

* drag web image to Mark Text

* add save notification

* opti uploading process

* fix did not close image selector bug

* check image content type when drag web link image

* fix: unable to preview relative path image.

* emit change event after paste/drop image

* add url map in image selector

* feat: screenshot and auto insert the screenshot image

* update error handler

* feat: use the native screencapture command line on macOs system

* opti: drop image

* fix: handle enter error when cursor is after a image

* fix: hasOwnProperty error

* remove debug codes

* fix: backspace when the previous ele is image

* fix: CI error and optimize some codes

* use hash of file path to generate the copied filename

* change default imageInsertAction to `path`

* fix: typo

* remove some unused codes and opti get image file name

* fix some bugs and opti codes

* update image edit icon

* romove screen capture on Linux and Windows

* fix: conflict

* fix error that can not insert image after the existed image or before existed image
2019-05-26 23:55:13 +08:00
Ran Luo
d71647fc9a opti: style in editor (#969)
* opti: style in editor

* change float box shadow

* add border to float box

* little code opti

* opti image style

* update style

* change code block bg color

* fix: update style

* opti codes
2019-04-26 22:33:29 +02:00
Ran Luo
ad5ddbf994
fix: GFM example 558 (#917) 2019-04-12 22:46:45 +08:00
Ran Luo
405d04ce19
package and release muya (#413) 2018-07-07 00:10:30 +08:00