Skip to content

modify ckeditor image upload function #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 1, 2022
Merged

modify ckeditor image upload function #6

merged 2 commits into from
Nov 1, 2022

Conversation

WeiJ0
Copy link
Contributor

@WeiJ0 WeiJ0 commented Oct 24, 2022

需要再下一次 npm install 有新增套件
主要針對 ckeditor 的圖片上傳功能寫了一個自定義參數做發送及 server 存圖片到本端並回傳路徑網址
然後不小心把一些怪圖推上來了XD

@@ -23,7 +23,9 @@
/>

<style>

figure img{
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

因為 ckeditor 的圖片不會自動響應式,避免版面直接爆掉所以先隱藏

this.loader = loader;
}
_initRequest() {
const assess_token = [TOKEN];
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

這邊要填上 Imgur 的 access_token,取得可以參考 取得

@@ -5,6 +5,7 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="" />
<meta name="referrer" content="no-referrer">
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imgur 有限制 referer,會顯示圖片在 localhost 端要加上這段

<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="" />
<meta name="referrer" content="no-referrer">
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imgur 有限制 referer,會顯示圖片在 localhost 端要加上這段

<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="" />
<meta name="referrer" content="no-referrer">
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imgur 有限制 referer,會顯示圖片在 localhost 端要加上這段

@Aya-X Aya-X merged commit 08e12ed into Aya-X:main Nov 1, 2022
Aya-X added a commit that referenced this pull request Nov 1, 2022
* modify ckeditor image upload function

* 修改為 imgur api

Co-authored-by: Wystan Lin <39123403+WeiJie0@users.noreply.github.com>

Co-authored-by: Aiden <110797130+WeiJ0@users.noreply.github.com>
Co-authored-by: Wystan Lin <39123403+WeiJie0@users.noreply.github.com>
Aya-X added a commit that referenced this pull request Nov 1, 2022
* modify ckeditor image upload function

* 修改為 imgur api

Co-authored-by: Wystan Lin <39123403+WeiJie0@users.noreply.github.com>

Co-authored-by: Aiden <110797130+WeiJ0@users.noreply.github.com>
Co-authored-by: Wystan Lin <39123403+WeiJie0@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants