This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mkdir ~/.npm-global | |
| npm config set prefix '~/.npm-global' | |
| export PATH=~/.npm-global/bin:$PATH | |
| source ~/.bashrc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Update package list and upgrade all packages | |
| sudo apt update && sudo apt upgrade -y | |
| # Install essential packages | |
| sudo apt install -y \ | |
| git \ | |
| curl \ | |
| vim \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const PROXY_CONFIG = [ | |
| { | |
| context: [ | |
| "/api", | |
| "/images" | |
| ], | |
| target: "https://localhost:7135", | |
| secure: false | |
| } | |
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Microsoft.AspNetCore.Mvc; | |
| using System.Text.Json; | |
| namespace ckedior_image_upload_angular_net.Server.Controllers | |
| { | |
| [Route("api/[controller]/[action]")] | |
| [ApiController] | |
| public class ImageController : ControllerBase | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div> | |
| <form [formGroup]="form" (ngSubmit)="onSubmit()"> | |
| <div> | |
| <label for="title">Title</label> | |
| <input name="title" id="title" type="text" formControlName="title" /> | |
| </div> | |
| <div> | |
| <label for="body">Body</label> | |
| <ckeditor | |
| [editor]="editor" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Component } from '@angular/core'; | |
| import { FormControl, FormGroup, Validators } from '@angular/forms'; | |
| import Editor from 'ckeditor5/build/ckeditor'; | |
| @Component({ | |
| selector: 'app-root', | |
| templateUrl: './app.component.html', | |
| styleUrls: ['./app.component.css'], | |
| }) | |
| export class AppComponent { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * @license Copyright (c) 2014-2023, CKSource Holding sp. z o.o. All rights reserved. | |
| * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license | |
| */ | |
| import { ClassicEditor } from '@ckeditor/ckeditor5-editor-classic'; | |
| import { Autoformat } from '@ckeditor/ckeditor5-autoformat'; | |
| import { Bold, Italic, Underline } from '@ckeditor/ckeditor5-basic-styles'; | |
| import { BlockQuote } from '@ckeditor/ckeditor5-block-quote'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { ClassicEditor } from '@ckeditor/ckeditor5-editor-classic'; | |
| import { | |
| FileLoader, | |
| UploadResponse, | |
| } from '@ckeditor/ckeditor5-upload/src/filerepository'; | |
| // Image Upload | |
| export default class MyUploadAdapter { | |
| loader: FileLoader; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { HttpClientModule } from '@angular/common/http'; | |
| import { NgModule } from '@angular/core'; | |
| import { BrowserModule } from '@angular/platform-browser'; | |
| import { AppComponent } from './app.component'; | |
| import { ReactiveFormsModule } from '@angular/forms'; | |
| import { CKEditorModule } from '@ckeditor/ckeditor5-angular'; | |
| @NgModule({ | |
| declarations: [AppComponent], |