prbaron / pbckcode

A CKEditor plugin to easily add code into your article
Apache License 2.0
44 stars 26 forks source link

callback on code (load / store) from ckeditor #27

Open pk-fr opened 10 years ago

pk-fr commented 10 years ago

that feature would be usefull to modify code on the fly. my personnal usage would be to append/prepend <?php .... ?> when loading php snippet and removing <?php / <? .... ?> when storing back in ckeditor, as ckeditor either hides code when using protected source or remove code when not using protected source as it considers code as an unknown tag!

maybe be that feature will allow other usefull processing in other context...

thanx

prbaron commented 10 years ago

as ckeditor either hides code when using protected source or remove code when not using protected source as it considers code as an unknown tag!

I tried with my configuration (CakePHP 2.5.x, CKEditor 4.4.3, pbckcode 1.2.2) and I have no problem with this.

Here is the code I tried.

<?php
  echo "hello world !"
?>