Mercurial Hosting > freedit
changeset 26:0837820b97fb
tinymce work
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Wed, 20 Jul 2022 15:47:18 -0600 |
parents | 66fd3784e60e |
children | 6871eec2cf4c |
files | src/test/tiny.html src/thread.html.luan |
diffstat | 2 files changed, 10 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
diff -r 66fd3784e60e -r 0837820b97fb src/test/tiny.html --- a/src/test/tiny.html Tue Jul 19 22:24:24 2022 -0600 +++ b/src/test/tiny.html Wed Jul 20 15:47:18 2022 -0600 @@ -33,7 +33,6 @@ function tinymceSetup(editor) { editor.ui.registry.addToggleButton('styleCode', { - //text: 'code', icon: 'sourcecode', tooltip: 'Code', onAction: function(api) { @@ -57,13 +56,20 @@ ]) } }); + + editor.on( 'init', function(e) {editor.focus()} ); + //editor.focus(); } tinymce.init({ selector: 'textarea', setup: tinymceSetup, + menubar: false, + statusbar: false, toolbar: 'link image media | styleCode bold italic underline strikethrough superscript styleText | blockquote numlist bullist', - plugins: ['link', 'image', 'media', 'lists', 'code'], + //block_formats: 'Paragraph=div; Header 1=h1; Header 2=h2; Header 3=h3', + plugins: ['link', 'image', 'media', 'lists', 'code', 'autoresize'], + autoresize_bottom_margin: 0, link_target_list: false, link_title: false, image_description: false, @@ -75,7 +81,7 @@ media_poster: false, media_url_resolver: media_url_resolver, text_patterns: false, - content_style: 'img {max-width: 500px;}', + content_style: 'img {max-width: 500px;} p {margin: 0}', //newline_behavior: 'linebreak', extended_valid_elements: 'b,i', formats: {