Giter VIP home page Giter VIP logo

Comments (3)

romanvm avatar romanvm commented on July 17, 2024

Please described your issue in more detail. When are script tags stripped? When you add them via TinyMCE code editor or when your text is saved? Anyway, I cannot reproduce your issue. I have added 'allow_script_urls': True, 'extended_valid_elements': 'script[charset|defer|async|language|src|type]' and inserted a simple JS alert box via TinyMCE code editor (<> button) and it wasn't stripped. It does not work in the editor, of course, but it works on the final pages.

Anyway, if the issue with the TinyMCE editor itself, it should be addressed to TinyMCE support team. I can help with TinyMCE<>Django integration part (within my abilities), but I'm no expert in TinyMCE core functionality.

from django-tinymce4-lite.

andy-io avatar andy-io commented on July 17, 2024

if i add the script by clicking the source code <> button as you said , then it works but if i add via the editor then it doesn't work.

from django-tinymce4-lite.

romanvm avatar romanvm commented on July 17, 2024

It shouldn't work via the editor. This is what a WYSIWYG editor is about: you don't work with raw tags but see the content as it appears on a website and you certainly cannot see script tags without looking into html source. If you need to insert samples of code that should be visible to readers, use codesample plugin, otherwise choose a different method to insert scripts into your content.

I'm closing this issue because it is certainly not relevant to django-tinymce4-lite package.

from django-tinymce4-lite.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.