baserCMS-Editor-Plugins / MarkdownEditor

[WIP]Markdown Editor for baserCMS
MIT License
2 stars 4 forks source link

動かしてみたところ以下のエラーが出ました。何か解決策ありませんでしょうか? #1

Open fuchigam1 opened 9 years ago

fuchigam1 commented 9 years ago

masterに入っているものをそのまま clone してインストールしてみたところ、 以下の内容でエラーが出てしまいました。。

エラー: syntax error, unexpected '^', expecting ']'
File: /app/Plugin/MarkdownEditor/webroot/js/admin/markdown_editor/main.js
Line: 85

何か解決策ありませんでしょうか?

YusukeHirao commented 9 years ago

@materializing :+1:

報告ありがとうございます。

う〜ん、正規表現の中の <? がPHPとして実行されていたりしますか?

実はまだローカルのPHP5.5しか試してないのですが、PHP5.4以上だとデフォルトでPHPのショートタグが有効なのでパースエラーになるんですよね。ショートタグはOFFにしてました。

あと、そもそもなぜ拡張子がjsのファイルがPHPのパースの影響を受けるのか理解できていないです。baserCMSって拡張子関係なしにPHPで実行されるんでしょうか?

fuchigam1 commented 9 years ago

ショートタグOFFで届けたエラーは消えましたが、今度は ■ main.js:18576

Uncaught Error: Invariant Violation: _registerComponent(...): Target container is not a DOM element.

と出ちゃいました。環境は PHP 5.4.19 です。

PHPで実行はされないと思いますが、MarkdownEditorHelper での main.js の書き方の場合、ファイルの読込時にphpは経由します。

YusukeHirao commented 9 years ago

いろいろ調査が必要ですね。

時間がとれればこちらでやりとりしましょう。 Join the chat at https://gitter.im/YusukeHirao/MarkdownEditor