Coder Social home page Coder Social logo

shridarpatil / frappe_tinymce Goto Github PK

View Code? Open in Web Editor NEW
33.0 3.0 37.0 18 KB

Frappe app to replace default text editor with tinymce

License: Other

Python 69.48% JavaScript 29.48% CSS 1.04%
rich-text-editor editor frappe frappe-text-editor frappe-framework frappe-bench tinymce

frappe_tinymce's Introduction

Frappe tinyMCE

tinyMCE Text Editor for frappe apps

Replace frappe's Quill Text Editor with tinyMCE Text Editor

Installation Steps

Step 1) One time to get app

bench get-app https://github.com/shridarpatil/frappe_tinymce

Step 2) to install app on any instance/site

bench --site [sitename] install-app frappe_tinymce

image

License

MIT

frappe_tinymce's People

Contributors

joeirimpan avatar shridarpatil avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

frappe_tinymce's Issues

Allowing for direct pasting of images into the text editor

** The Problem **
In the quill text editor that is available by default in Frappe, it's quite easy to paste images, one can take a screenshot on Windows with the Win + Shift + S shortcut and then go over to the editor and Ctrl + V and the image is there.

In the tinyMCE editor, when we typically try the same behaviour as above, the image does not auto-paste.

** What I've tried **

  • Headed over to the tinyMCE website, tiny.cloud and checked whether it was a limitation on the editor side. Tried pasting an image into their online editor. Works without any problems.

** Solutions **

  • To be discussed.

TinyMCE Breaks Frappe In-App Email Functionality

Describe the bug
This plugin is great, thanks so much for making it available! In my experience, it delivers on it's promise to load the TinyMCE editor instead of Quill in the standard text editor fields. Unfortunately, it simultaneously breaks the in-doc Email functionality in Frappe.

To Reproduce
Steps to reproduce the behavior:

  1. Install frappe_tinymce
  2. Open any document.
  3. Scroll down to the bottom and select "New Email"
  4. See error in the browser console.

Expected behavior
"New Email" should trigger a modal that allows the user to initiate a new email from the platform.

Actual behavior
Nothing happens! The action just triggers an error in the console.

Additional context
This was tested and triaged in both Firefox and Chrome browsers, on Frappe version 13 and 14 beta.

Here's the browser console error:

Uncaught TypeError: can't access property "open", o is undefined
tinymce.min.js:9:333666

And full browser console error log:
erp.avu.nu-1648925803208.log

Terms and condition not fetching

ERPNEXT Version: 14

While selecting terms and condition form sales order, qtn etc.. data from template is not showing in text editor

frappe_tinymce.mp4

Please check the video for more clarification

Cannot get value of Text Editor field in dialog

Describe the bug
The key and value of a Text Editor field are not included in the values object in the primary_action function of a dialog.

To Reproduce

frm.add_custom_button("Test dialog", function(){
            let test_dialog = new frappe.ui.Dialog({
                title: 'Enter details',
                fields: [
                    {
                        label: 'Text',
                        fieldname: 'test_txt',
                        fieldtype: 'Text Editor',
                    }
                ],
                primary_action_label: 'Submit',
                primary_action(values){
                    console.log(values)
                    test_dialog.hide()
                }
            })

            test_dialog.show()
        })

In the code above, I create a dialog with a Text Editor field with the name of test_txt. Then I type something, e.g. abcdef in the field and click Submit button.

The result is expected to be {test_txt: 'abcdef'}. But the result is {} instead.

My initial solution for getting the needed result is to use test_dialog.fields_dict.test_txt.value. But it would be better if it can be directly obtained from the values.

Please fix this issue. Thank you very much.

Desktop:

  • OS: macOS.
  • Browser: Chrome
  • Frappe version: 14

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.