-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
157 changed files
with
31,398 additions
and
17 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?php | ||
namespace Pondol\Editor\Http\Controllers; | ||
|
||
use Illuminate\Http\Request; | ||
use Pondol\Editor\Traits\SmartEditor; | ||
|
||
use App\Http\Controllers\Controller; | ||
class FroalaEditorController extends Controller | ||
{ | ||
|
||
use SmartEditor; | ||
/** | ||
* Create a new controller instance. | ||
* | ||
* @return void | ||
*/ | ||
public function __construct() | ||
{ | ||
} | ||
|
||
public function create() | ||
{ | ||
$data = $this->_create(); | ||
return view('editor::froala.sample', $data); | ||
} | ||
|
||
public function store(Request $request) { | ||
$pattern = '|(<p data-f-id)(.*)/p>|'; | ||
// preg_match_all($pattern1, $request->editor_content, $matches); | ||
// print_r($matches); | ||
|
||
$editor_content = preg_replace($pattern, '', $request->editor_content); | ||
echo $editor_content; | ||
} | ||
|
||
public function upload() | ||
{ | ||
return view('editor::smart-editor.photo-upload', []); | ||
} | ||
|
||
public function uploadStore(Request $request) { | ||
$result = $this->_uploadStore($request); | ||
if($result['error']) { | ||
return redirect($result['error']); | ||
} | ||
return $result['url']; | ||
} | ||
|
||
public function uploadStoreHtml5(Request $request) { | ||
return $this->_uploadStoreHtml5($request); | ||
} | ||
|
||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?php | ||
namespace Pondol\Editor\Http\Controllers; | ||
|
||
use Illuminate\Http\Request; | ||
use Pondol\Editor\Traits\SmartEditor; | ||
|
||
use App\Http\Controllers\Controller; | ||
class SmartEditorController extends Controller | ||
{ | ||
|
||
use SmartEditor; | ||
/** | ||
* Create a new controller instance. | ||
* | ||
* @return void | ||
*/ | ||
public function __construct() | ||
{ | ||
} | ||
|
||
public function create() | ||
{ | ||
$data = $this->_create(); | ||
return view('editor::smart-editor.sample', $data); | ||
} | ||
|
||
public function store(Request $request) { | ||
print_r($request->all()); | ||
} | ||
|
||
public function upload() | ||
{ | ||
return view('editor::smart-editor.photo-upload', []); | ||
} | ||
|
||
public function uploadStore(Request $request) { | ||
$result = $this->_uploadStore($request); | ||
if($result['error']) { | ||
return redirect($result['error']); | ||
} | ||
return $result['url']; | ||
} | ||
|
||
public function uploadStoreHtml5(Request $request) { | ||
return $this->_uploadStoreHtml5($request); | ||
} | ||
|
||
} |
This file contains 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
Oops, something went wrong.