Git Product home page Git Product logo

yii2-content-tools's People

Contributors

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

yii2-content-tools's Issues

bizley/contenttools 1.5.0 requires bower-asset/contenttools ^1.0 -> no matching package found.


Using version ^1.5 for bizley/contenttools
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for bizley/contenttools ^1.5 -> satisfiable by bizley/contenttools[1.5.0].
    - bizley/contenttools 1.5.0 requires bower-asset/contenttools ^1.0 -> no matching package found.

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
 - It's a private package and you forgot to add a custom repository to find it

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

Editable Toolbox?

Hi! How about edit/change toolbox? I want to remove some buttons.

It can be something like this: editor.toolbox().tools({$this->toolbox});
in /src/ContentTools.php:307 InitEditor method?

Problem with images

Hello I have some problems a doubts with images.

1. Need a div with a class
I have an image that will be replace with other javascript in background.
if i do this, with the div before code:

<div class="background-image-holder">
   <?php \bizley\contenttools\ContentTools::begin(); ?>
      <img class="nsp" alt="image" src="/img/Ethiopia-National-Geographic.jpg">
   <?php \bizley\contenttools\ContentTools::end(); ?>
</div>

the image will be not appears, other way if i will replace like this, with the internal div:

<?php \bizley\contenttools\ContentTools::begin(); ?>
   <div class="background-image-holder">
      <img class="nsp" alt="image" src="/img/Ethiopia-National-Geographic.jpg">
   </div>
<?php \bizley\contenttools\ContentTools::end(); ?>

the image will be appear but not editable

I read in doc maybe the solution is by some options, like tag or style but i am not sure and i don't know how to use.
I try it without success

2 The normal images
with the normal images

<?php \bizley\contenttools\ContentTools::begin(); ?>
   <img class="nsp" alt="Pic" src="/img/men.jpg"> 
<?php \bizley\contenttools\ContentTools::end(); ?>

if i press edit button, that will take a different dimension, maybe the original one.. the script put in html different dimensions and is not nice to see.
it is possible not change the dimensions taking those of the website?
maybe directly javascript file, but will be better if there is some solution by php

edit:
For this problem I found a solution by javascript.
in content-tools.js line 4059

if (this._attributes['width']) {
// Changed this line from this._attributes['width'] to 100% fixed
   style += "width:100%;";
}
if (this._attributes['height']) {
   style += "height:" + this._attributes['height'] + "px;";
}

thanks
Gabriele

Dependabot can't resolve your PHP dependency files

Dependabot can't resolve your PHP dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

Your requirements could not be resolved to an installable set of packages.
  Problem 1
    - yiisoft/yii2 2.0.38 requires bower-asset/inputmask ~3.2.2 | ~3.3.5 -> no matching package found.
    - yiisoft/yii2 2.0.37 requires bower-asset/inputmask ~3.2.2 | ~3.3.5 -> no matching package found.
    - yiisoft/yii2 2.0.36 requires bower-asset/inputmask ~3.2.2 | ~3.3.5 -> no matching package found.
    - yiisoft/yii2 2.0.35 requires bower-asset/inputmask ~3.2.2 | ~3.3.5 -> no matching package found.
    - yiisoft/yii2 2.0.34 requires bower-asset/inputmask ~3.2.2 | ~3.3.5 -> no matching package found.
    - yiisoft/yii2 2.0.33 requires bower-asset/inputmask ~3.2.2 | ~3.3.5 -> no matching package found.
    - yiisoft/yii2 2.0.32 requires bower-asset/inputmask ~3.2.2 | ~3.3.5 -> no matching package found.
    - yiisoft/yii2 2.0.31 requires bower-asset/inputmask ~3.2.2 | ~3.3.5 -> no matching package found.
    - yiisoft/yii2 2.0.30 requires bower-asset/inputmask ~3.2.2 | ~3.3.5 -> no matching package found.
    - yiisoft/yii2 2.0.29 requires bower-asset/inputmask ~3.2.2 | ~3.3.5 -> no matching package found.
    - yiisoft/yii2 2.0.28 requires bower-asset/inputmask ~3.2.2 | ~3.3.5 -> no matching package found.
    - yiisoft/yii2 2.0.27 requires bower-asset/inputmask ~3.2.2 | ~3.3.5 -> no matching package found.
    - yiisoft/yii2 2.0.26 requires bower-asset/inputmask ~3.2.2 | ~3.3.5 -> no matching package found.
    - yiisoft/yii2 2.0.25 requires bower-asset/inputmask ~3.2.2 | ~3.3.5 -> no matching package found.
    - yiisoft/yii2 2.0.24 requires bower-asset/inputmask ~3.2.2 | ~3.3.5 -> no matching package found.
    - yiisoft/yii2 2.0.23 requires bower-asset/inputmask ~3.2.2 | ~3.3.5 -> no matching package found.
    - yiisoft/yii2 2.0.22 requires bower-asset/inputmask ~3.2.2 | ~3.3.5 -> no matching package found.
    - yiisoft/yii2 2.0.21 requires bower-asset/inputmask ~3.2.2 | ~3.3.5 -> no matching package found.
    - yiisoft/yii2 2.0.20 requires bower-asset/inputmask ~3.2.2 | ~3.3.5 -> no matching package found.
    - yiisoft/yii2 2.0.19 requires bower-asset/inputmask ~3.2.2 | ~3.3.5 -> no matching package found.
    - yiisoft/yii2 2.0.18 requires bower-asset/inputmask ~3.2.2 | ~3.3.5 -> no matching package found.
    - yiisoft/yii2 2.0.17 requires bower-asset/inputmask ~3.2.2 | ~3.3.5 -> no matching package found.
    - yiisoft/yii2 2.0.16.1 requires bower-asset/inputmask ~3.2.2 | ~3.3.5 -> no matching package found.
    - yiisoft/yii2 2.0.16 requires bower-asset/inputmask ~3.2.2 | ~3.3.5 -> no matching package found.
    - yiisoft/yii2 2.0.15.1 requires bower-asset/inputmask ~3.2.2 | ~3.3.5 -> no matching package found.
    - yiisoft/yii2 2.0.15 requires bower-asset/inputmask ~3.2.2 | ~3.3.5 -> no matching package found.
    - yiisoft/yii2 2.0.14.2 requires bower-asset/inputmask ~3.2.2 | ~3.3.5 -> no matching package found.
    - yiisoft/yii2 2.0.14.1 requires bower-asset/inputmask ~3.2.2 | ~3.3.5 -> no matching package found.
    - yiisoft/yii2 2.0.14 requires bower-asset/inputmask ~3.2.2 | ~3.3.5 -> no matching package found.
    - yiisoft/yii2 2.0.13.3 requires bower-asset/inputmask ~3.2.2 | ~3.3.5 -> no matching package found.
    - yiisoft/yii2 2.0.13.2 requires bower-asset/inputmask ~3.2.2 | ~3.3.5 -> no matching package found.
    - yiisoft/yii2 2.0.13.1 requires bower-asset/inputmask ~3.2.2 | ~3.3.5 -> no matching package found.
    - yiisoft/yii2 2.0.13 requires bower-asset/inputmask ~3.2.2 | ~3.3.5 -> no matching package found.
    - roave/security-advisories dev-master conflicts with yiisoft/yii2[2.0.10].
    - roave/security-advisories dev-master conflicts with yiisoft/yii2[2.0.11].
    - roave/security-advisories dev-master conflicts with yiisoft/yii2[2.0.11.1].
    - roave/security-advisories dev-master conflicts with yiisoft/yii2[2.0.11.2].
    - roave/security-advisories dev-master conflicts with yiisoft/yii2[2.0.12].
    - roave/security-advisories dev-master conflicts with yiisoft/yii2[2.0.12.1].
    - roave/security-advisories dev-master conflicts with yiisoft/yii2[2.0.12.2].
    - roave/security-advisories dev-master conflicts with yiisoft/yii2[2.0.5].
    - roave/security-advisories dev-master conflicts with yiisoft/yii2[2.0.6].
    - roave/security-advisories dev-master conflicts with yiisoft/yii2[2.0.7].
    - roave/security-advisories dev-master conflicts with yiisoft/yii2[2.0.8].
    - roave/security-advisories dev-master conflicts with yiisoft/yii2[2.0.9].
    - Installation request for roave/security-advisories dev-master -> satisfiable by roave/security-advisories[dev-master].
    - Installation request for yiisoft/yii2 >=2.0.5 <2.1.0 -> satisfiable by yiisoft/yii2[2.0.10, 2.0.11, 2.0.11.1, 2.0.11.2, 2.0.12, 2.0.12.1, 2.0.12.2, 2.0.13, 2.0.13.1, 2.0.13.2, 2.0.13.3, 2.0.14, 2.0.14.1, 2.0.14.2, 2.0.15, 2.0.15.1, 2.0.16, 2.0.16.1, 2.0.17, 2.0.18, 2.0.19, 2.0.20, 2.0.21, 2.0.22, 2.0.23, 2.0.24, 2.0.25, 2.0.26, 2.0.27, 2.0.28, 2.0.29, 2.0.30, 2.0.31, 2.0.32, 2.0.33, 2.0.34, 2.0.35, 2.0.36, 2.0.37, 2.0.38, 2.0.5, 2.0.6, 2.0.7, 2.0.8, 2.0.9].

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
 - It's a private package and you forgot to add a custom repository to find it

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

bizley/contenttools 1.5.0 requires bower-asset/contenttools ^1.0 -> no matching package found.

Your requirements could not be resolved to an installable set of packages.

Problem 1
- Installation request for bizley/contenttools ^1.5 -> satisfiable by bizley/contenttools[1.5.0].
- bizley/contenttools 1.5.0 requires bower-asset/contenttools ^1.0 -> no matching package found.

Potential causes:

Read https://getcomposer.org/doc/articles/troubleshooting.md for further common problems.

Installation failed, reverting ./composer.json to its original content.

composer.json

"repositories": { "packagist": { "type": "composer", "url": "https://packagist.phpcomposer.com" } }

Update to 1.0 Bower issues

Hi man,

Great extension!

I was updating the extension today and get following error:


  [Composer\Downloader\TransportException]                                     
  The "https://bower.herokuapp.com/packages/search/contenttools" file could n  
  ot be downloaded (HTTP/1.1 404 Not Found)   

Any suggestions?
Thanks again

multi language content

is it possible to create content with Yii::t in the views and edit it?
for example this:
Yii::t('app',editable content)
or add sth in editor which we can capable to add multi language content?

Unable to upload image file using editor

    public function run()
    {
        if (!Yii::$app->request->isPost) {
            return Json::encode(['errors' => ['POST parameters are missing!']]);
        }
        try {
            $data = Yii::$app->request->post();
            if (empty($data['url'])) {
                throw new InvalidParamException('Parameter "url" is missing!');
            }
            $url = trim($data['url']);
            if (strpos($url, '/') === 0) {
                $url = substr($url, 1);
            }
            if (strpos($url, '?_ignore=') !== false) {
                $url = substr($url, 0, strpos($url, '?_ignore='));
            }
            $imageSizeInfo = @getimagesize($url);
            if ($imageSizeInfo === false) {
                throw new InvalidParamException('Parameter "url" seems to be invalid!');
            }
            if (!empty($data['crop'])) {
                $crop = explode(',', $data['crop']);
                if (count($crop) !== 4) {
                    throw new InvalidParamException('Parameter "crop" is invalid!');
                }
                $positions = [];
                foreach ($crop as $position) {
                    $position = trim($position);
                    if (!is_numeric($position) || $position < 0 || $position > 1) {
                        throw new InvalidParamException('Parameter "crop" contains invalid value!');
                    }
                    $positions[] = $position;
                }
                list($width, $height) = $imageSizeInfo;
                Image::crop(
                    $url,
                    floor($width * $positions[3] - $width * $positions[1]),
                    floor($height * $positions[2] - $height * $positions[0]),
                    [
                        floor($width * $positions[1]),
                        floor($height * $positions[0])
                    ]
                )->save($url);
            }
            return Json::encode([
                'size' => @getimagesize($url),
                'url' => '/' . $url,
                'alt' => basename($url)
            ]);
        } catch (Exception $e) {
            return Json::encode(['errors' => [$e->getMessage()]]);
        }
    }

Error ```
$imageSizeInfo = @getimagesize($url);
if ($imageSizeInfo === false) {
throw new InvalidParamException('Parameter "url" seems to be invalid!');
}

Case sensitive directory name on linux systems

Invalid Argument โ€“ yii\base\InvalidArgumentException The file or directory to be published does not exist: /var/www/html/vendor/bower/contenttools/build
Directory name should be bower/ContentTools/build

image preview not working

Image preview inside upload modal form not working, it triggered "Image URL seems to be invalid!" error message, but file uploaded to folder successfully.

my workaround is add few code (inside your UploadAction.php)

if ($model->validate()) {
if ($model->upload()) {
$image_path = Yii::getAlias('@webroot') . $model->url;
$imageSizeInfo = @getimagesize($image_path);

//$imageSizeInfo = @getimagesize($model->url);

and now it works :)

saveEngine

Hello, in my SiteController I put the new save path but is not working

/**
     * @inheritdoc
     */
    public function actions()
    {
        return [
            'error' => [
                'class' => 'yii\web\ErrorAction',
            ],
            'content-tools-image-upload' => \bizley\contenttools\actions\UploadAction::className(),
            'content-tools-image-insert' => \bizley\contenttools\actions\InsertAction::className(),
            'content-tools-image-rotate' => \bizley\contenttools\actions\RotateAction::className(),
            'saveEngine' => [
                'save' => '/site/savecontent',
            ],
        ];
    }`
it is correct ?

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.