GithubHelp home page GithubHelp logo

bizley / yii2-quill Goto Github PK

View Code? Open in Web Editor NEW
62.0 9.0 15.0 1.58 MB

Yii 2 implementation of Quill, modern WYSIWYG editor

License: Apache License 2.0

PHP 100.00%
yii2 yii2-quill wysiwyg widget katex highlight quill quilljs syntax-highlighting hacktoberfest

yii2-quill's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar eseperio avatar simialbi 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  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  avatar  avatar  avatar  avatar  avatar  avatar

yii2-quill's Issues

CDN not working

Hello

I have a problem with several ISPs which are blocking quill cdn (Russia).
If it is possible could you please add local copies with possibility to include them if cnd is not available

Thank you

use non-cdn asset

Hi,

in some installations internet access might be restricted and the quill asset cannot be retrieved from cdn. Could there be a flag to use a local quill asset instead of the cdn url?

Click listener catches unexpected cases

Hey, @bizley!

Thanks for your extension.

I've noticed that on click by text input on link/embed tooltip, your click event with focus on editor will fired and tooltip hidden without any possibility to interact.

quill issue 2020-01-15 in 12 21 02

If I remove this event, quill's behave as expected. Why you adds this?

$js .= "document.getElementById(\"editor-{$this->id}\").onclick=function(e){document.querySelector(\"#editor-{$this->id} .ql-editor\").focus();};";

How can I add an attribute to hidden input field?

I need to add an attribute such as form="idOfMyForm" to the hidden input field since my quill editor is outside my form container. But if I add this via an option as below the form attribute ends up on a div container rather than on hidden input field and on submitting the form the input field's value is not submitted.

				$form->field($model, 'press_release', [
				'options' => ['form' => 'starterWizard__form']
				])
				->label('Add press release:')
				->widget(\bizley\quill\Quill::class, [
					'toolbarOptions' => 'FULL'
				]);

Retrieve stored information to edit.

Hello,

I would like to know if you can help me with an inquiry. First, thanks for sharing this solution. I already set up everything and its running smoothly. However, I would like to know if there's a way to retrieve content already stored in the database and modify it using quill.

<?= $form->field($model, 'note')->widget(\bizley\quill\Quill::class, [ 'toolbarOptions' => 'FULL', 'options' => ['style' => 'min-height:350px;'] ]) ?>

This is the method used according to the instructions. However, is there any way to get something like this?

editor.root.innerHTML = $retrievedNote;

I hope you can help me with my doubt.

Best wishes,

David

yii2-quill with quill-mention?

Hi all,
I'm trying to setup this brilliant solution on auto mentions in Quill, and feel little stuck.
Can't quite get it -- how do I properly initialize any other modules other than formula and syntax? And not only initialize with true, but also pass several params and callbacks within.
If anybody could help, this would be very nice and kind!
-- best

Enhancement: Allow editor to be resized?

The docs state:

Editor box's height
Default editor height is 150px (this can be changed by setting 'options' parameter) and its box extends as new text lines are added.

So I was able to increase the default editor size via:

'options' => [
    'style' => 'min-height: 300px;',
],

When you state "its box extends as new text lines are added", does this mean the editor's height should grow automatically? It just scrolls for me.

It would be ideal if there was a way to make the editor resizable by dragging the bottom-right corner.

Quill 1.0

I'm checking the compatibility with Quill 1.0 now. New release may appear soon.

Upgrading to the new version 1.2.0

When upgrading to the new version 1.2.0 (Yii 2.0: yii2-quill), the extension has crashed, giving the following error message: PHP Compile Error - yii \ base \ ErrorException Can not use method return value in write context

What is wrong ???

Thank you...

Error message:

PHP Compile Error โ€“ yii\base\ErrorException

Can't use method return value in write context

  1. in C:\xampp\htdocs\igaiAFMonit_protected\vendor\bizley\quill\Quill.php at line 250

}

/**
 * Renders toolbar.
 * @return string
 * @since 1.2.0
 */
public function renderToolbar()
{
    if (!empty($this->quillToolbar->getElements())) {
        $toolbarId = 'toolbar-' . $this->id;

        if (empty($this->configs['modules'])) {
            $this->configs['modules'] = ['toolbar' => []];
        }
        $this->configs['modules']['toolbar'] = ['container' => '#' . $toolbarId];

        return $this->quillToolbar->render($toolbarId);
    }
  1. yii\base\ErrorHandler::handleFatalError()

How to preserve ids and classes on pasted content

I'm trying to copy/paste text from a Word doc into the Quill editor and but all my ids and classes are being stripped. Is there a way to configure this module to modify the whitelist and ensure it gets properly preserved to the Yii db?

Specifically, I'm trying to handle footnotes which use anchor links that depend on id attributes. I'd also like preserve classes so I can style these footnotes.

I know this is probably more of a Quill/Parchment issue, but I've spent days and simply cannot figure out a solution. I suspect it has to do with adding an attributor or a clipboard matcher but the documentation is very terse and I've gotten nowhere. I was hoping you could help.

Quill cannot import module smart-breaker

Hi,
I have installed both the Quill editor and the smart break module as per instruction (using composer.json). The Quill editor works fine. When I try to use the Smart-breaker module, I have an error state that Quill cannot import module/smart-breaker (see attached image)
Quill-smart-breaker-error
Below is the code for Quill

echo $form->field($model, 'description')->widget(Quill::class, [
            'config' => ['localAssetss' => TRUE,],
            'options' => ['style' => 'height:220px', ],
            'modules' => [
                'formula' => TRUE, 
                'smart-breaker' => TRUE,
            ],
            'toolbarOptions' => [
                [['header' => [1, 2, 3, 4, FALSE]]],
                ['bold', 'italic', 'underline', 'strike'],
                ['link'],
                [['list' => 'bullet'], ['list' => 'ordered']],
                [['indent' => '-1'], ['indent' => '+1']],
                ['formula'],
            ],
        ])

If I comment out the line 'smart-breaker' => TRUE, then it works fine. I check and the smart-break files were install at vendor/npm-asset/quill-smart-break

Note that the vendor files are shared among many projects, hence, located outside the project directory. We used quite a number of Yii extensions without any issue.

I have googled for this issue but couldn't find anyone report similar issue.

Thanks,
D

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.