Studio-42 / elFinder

📁 Open-source file manager for web, written in JavaScript using jQuery and jQuery UI
https://studio-42.github.io/elFinder/
Other
4.65k stars 1.42k forks source link

Empty demension fields #3255

Closed alivato closed 3 years ago

alivato commented 3 years ago

Hi & thank you

I use elfinder with tinymce / textpattern cms How can I hide dimensition(html) then I upload and paste image? ? How to make the fields empty or 0? (not asked in html)

image how

I don't want to specify width and height in html. I already have it written in CSS

<script type="text/javascript" src="http://site.com/textpattern/js/tinymce/tinymce.min.js"></script>

<script type="text/javascript">
    tinymce.init({
        selector: 'textarea',
        file_picker_callback: elFinderBrowser,
        images_upload_handler: elFinderBrowser,
        menubar: false,
        plugins: ["autolink link image media table code"],      
        toolbar: ["autolink link image media table code"],
        relative_urls: false
    }); 

function elFinderBrowser (callback, value, meta) {
  tinymce.activeEditor.windowManager.open({
    file: 'http://site.com/textpattern/js/elfinder/elfinder.html', // use an absolute path!
    title: 'elFinder 2.1',
    width: 900,  
    height: 450,
    resizable: 'yes'
  }, {
    oninsert: function (file, fm) {
      var url, reg, info;

      // URL normalization
      url = fm.convAbsUrl(file.url);

      // Make file info
      info = file.name + ' (' + fm.formatSize(file.size) + ')';

      // Provide file and text for the link dialog
      if (meta.filetype == 'file') {
        callback(url, {text: info, title: info});
      }

      // Provide image and alt text for the image dialog
      if (meta.filetype == 'image') {
        callback(url, {alt: info});
      }

      // Provide alternative source and posted for the media dialog
      if (meta.filetype == 'media') {
        callback(url);
      }
    }
  });
  return false;
}

</script>  

<script type="text/javascript">
    $(document).ready(function() {
        //your code here
    });
</script>
nao-pon commented 3 years ago

@alivato This is a TinyMCE issue, not elFinder. Please ask at the right place.