Skip to content

Commit

Permalink
fix tinymce JS syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
zenn1989 committed Jul 17, 2022
1 parent 6c37f6a commit 2009989
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
9 changes: 4 additions & 5 deletions src/Apps/View/Admin/default/widgets/tinymce/small.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,22 @@ function setResponseUrl(callbackId, url) {

tinymce.init({
selector: '.wysiwyg',
height: 200,
height: 250,
menubar: false,
plugins: [
'advlist autolink lists link image imagetools charmap',
'visualblocks code',
'media paste codesample'
],
toolbar: 'bold italic subscript superscript forecolor blockquote | removeformat | bullist numlist | insert',
toolbar: 'bold italic subscript superscript blockquote | removeformat | bullist numlist | code',
image_advtab: false,
visualblocks_default_state: false,
end_container_on_empty_block: true,
default_link_target: "_blank",
paste_as_text: true,
valid_elements: 'p,strong,i,em,sup,sub,span[class,style,id],a[class,style,id,href],img[src,alt,class],ul[class,style,id],li[class,style,id],ol[class,style],table[class,style],tr[class,style],td[class,style],thead,tbody',
extended_valid_elements: 'i[class|id],span[class,id]',
valid_elements: 'p,strong,i,em,sup,sub,blockquote,a[class|style|id|href],img[src|alt|class],ul[class|style|id],li[class|style|id],ol[class|style],table[class,style],tr[class|style],td[class|style],thead|tbody',
convert_urls: false,
relative_urls: false,
relative_urls: true,
language_url: '<?= \App::$Alias->scriptUrl ?>/vendor/phpffcms/ffcms-tinymce/assets/js/langs/' + script_lang + '.js',
language: script_lang,
setup: function(e) { // save values to textarea hidden
Expand Down
4 changes: 2 additions & 2 deletions src/Apps/View/Front/default/widgets/tinymce/small.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ function setResponseUrl(callbackId, url) {
end_container_on_empty_block: true,
default_link_target: "_blank",
paste_as_text: true,
valid_elements: 'strong,i,em,sup,sub,span[class,style,id],a[class,style,id,href],img[src,alt,class],ul[class,style,id],li[class,style,id],ol[class,style],table[class,style],tr[class,style],td[class,style],thead,tbody',
extended_valid_elements: 'i[class|id],span[class,id]',
valid_elements: 'strong,i,em,sup,sub,span[class|style|id],a[class|style|id|href],img[src|alt|class],ul[class|style|id],li[class|style|id],ol[class|style],table[class|style],tr[class|style],td[class|style],thead,tbody',
extended_valid_elements: 'i[class|id],span[class|id]',
convert_urls: false,
relative_urls: false,
language_url: '<?= \App::$Alias->scriptUrl ?>/vendor/phpffcms/ffcms-tinymce/assets/js/langs/' + script_lang + '.js',
Expand Down

0 comments on commit 2009989

Please sign in to comment.