Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Зуев Егор
/
wiki.dev
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Authored by
Dan Brown
2016-03-09 22:54:18 +0000
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Commit
93ebdf724b9cd051b3bfb3bd1dcc748b0c7fb714
93ebdf72
1 parent
59ce228c
Changed direct attributes to prevent conflicts
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
resources/assets/js/directives.js
resources/views/pages/form.blade.php
resources/assets/js/directives.js
View file @
93ebdf7
...
...
@@ -167,18 +167,19 @@ module.exports = function (ngApp, events) {
restrict
:
'A'
,
scope
:
{
tinymce
:
'='
,
ng
Model
:
'='
,
ng
Change
:
'='
mce
Model
:
'='
,
mce
Change
:
'='
},
link
:
function
(
scope
,
element
,
attrs
)
{
function
tinyMceSetup
(
editor
)
{
editor
.
on
(
'keyup'
,
(
e
)
=>
{
var
content
=
editor
.
getContent
();
console
.
log
(
content
);
scope
.
$apply
(()
=>
{
scope
.
ng
Model
=
content
;
scope
.
mce
Model
=
content
;
});
scope
.
ng
Change
(
content
);
scope
.
mce
Change
(
content
);
});
}
...
...
resources/views/pages/form.blade.php
View file @
93ebdf7
...
...
@@ -31,7 +31,7 @@
</div>
</div>
<div
class=
"edit-area flex-fill flex"
>
<textarea
id=
"html-editor"
tinymce=
"editorOptions"
ng-change=
"editorChange"
ng-model=
"editorHtml"
name=
"html"
rows=
"5"
<textarea
id=
"html-editor"
tinymce=
"editorOptions"
mce-change=
"editorChange"
mce-model=
"editorHtml"
name=
"html"
rows=
"5"
@
if
($
errors-
>
has('html')) class="neg" @endif>@if(isset($model) || old('html')){{htmlspecialchars( old('html') ? old('html') : $model->html)}}@endif
</textarea>
@if($errors->has('html'))
<div
class=
"text-neg text-small"
>
{{ $errors->first('html') }}
</div>
...
...
Please
register
or
sign in
to post a comment