Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example code from main website is not working - lack trailing comma #9548

Open
oleevier opened this issue Apr 11, 2024 · 1 comment
Open

Comments

@oleevier
Copy link

oleevier commented Apr 11, 2024

📝 Provide detailed reproduction steps (if any)

  1. Open https://www.tiny.cloud/
  2. Find section : "Get started with justa few lines of code"
  3. Select Bootstrap
  4. Copy selected code
  5.  <head>
     <!-- Required meta tags -->
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width, initial-scale=1">
    
     <!-- Bootstrap CSS -->
     <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
     <!-- TinyMCE -->
     <script src="https://cdn.tiny.cloud/1/no-api-key/tinymce/7/tinymce.min.js" referrerpolicy="origin"></script>
     <script>
       tinymce.init({
         selector: 'textarea#tiny'
             plugins: [
             'a11ychecker','advlist','advcode','advtable','autolink','checklist','markdown',
             'lists','link','image','charmap','preview','anchor','searchreplace','visualblocks',
             'powerpaste','fullscreen','formatpainter','insertdatetime','media','table','help','wordcount'
             ],
             toolbar: 'undo redo | a11ycheck casechange blocks | bold italic backcolor | alignleft aligncenter alignright alignjustify |' +
             'bullist numlist checklist outdent indent | removeformat | code table help'
       })
     </script>
     </head>
     <body>
     <div>
       <textarea id="tiny"></textarea>
     </div>
     <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script> 
     </body> 
    
  6. Use it on own page

✔️ Expected result

Should attach tinymce functionality to selector with id="tiny"

❌ Actual result

Not working

❓ Possible solution

There is no trailing comma after selector in copied code
Similar error is described on : https://www.tiny.cloud/blog/tinymce-not-working/
But I dont think user should start using your code with not working copied code from official page.
I think you should bring back that trailing comma ;)

📃 Other details

  • Browser: Chrome
  • OS: Win 11

If you'd like to see this fixed sooner, add a 👍 reaction to this post.

@TheSpyder
Copy link
Member

Confirmed, thank you for the report. I will pass this to our website team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants