0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

CakePHP3 にマークダウンライブラリ(TOAST UI Editor)を組み込む手順

Last updated at Posted at 2019-09-21

概要

  • マークダウンを既存アプリ(CakePHP3.6)に組み込みたい。
  • マークダウンのライブラリとして「TOAST UI Editor」を使ってみる。
  • TOAST UI Editor を使うにはNode.jsのインストールが必要。
  • ちなみにNodeJsは今まで使ったことありません。

環境

  • CentOS 7.6
  • CakePHP 3.6.14

手順

####1.nodejs npmのインストール
  →こちらに記載

####2.TOAST UI Editorのインストール

プロジェクトをカレントにしてからインストール
# cd /var/www/html/sample_app
# npm install --save tui-editor

####3.ライブラリのシンボリックリンクを張る
webroot配下でライブラリを参照したいため、node_modulesにシンボリックリンクを張る

# ln -s /var/www/html/sample_app/node_modules /var/www/html/sample_app/webroot/lib

思ったこと

目的は達成しました。だがしかし!NodeJsのライブラリを参照するのはこの方法でよいのか!?

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?