Giter VIP home page Giter VIP logo

nova4-tinymceeditor's Introduction

πŸ’« About Me:

πŸ”­ I’m currently working on 3Labs as CTO
🀝 I’m helping in SSO
🌱 I’m currently mastering TALL stack

🌐 Socials:

LinkedIn Twitter

πŸ’» Tech Stack:

Laravel PHP JavaScript HTML5 CSS3 GraphQL Cloudflare Vercel Next JS React Vue.js Nginx Apache MySQL MariaDB Redis Figma Adobe Photoshop Adobe Illustrator Affinity Designer Raspberry Pi LINUX

πŸ“Š GitHub Stats:



πŸ† GitHub Trophies

πŸ” Top Contributed Repo


πŸ’° You can help me by Donating

Ko-Fi

nova4-tinymceeditor's People

Contributors

ahmic avatar joemires avatar murdercode avatar wijaksanapanji avatar

Stargazers

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

Watchers

 avatar

nova4-tinymceeditor's Issues

Always show on detail page

Hi

How to always show content on detail page?

UPD:

please, change TinymceEditor.php (I can't create pull request)

namespace Murdercode\TinymceEditor;

use Laravel\Nova\Fields\Field;
use Laravel\Nova\Fields\SupportsDependentFields;
use Laravel\Nova\Fields\Expandable;

class TinymceEditor extends Field
{
    use SupportsDependentFields;
    use Expandable;

    /**
     * The field's component.
     *
     * @var string
     */
    public $component = 'tinymce-editor';

    /**
     * Indicates if the element should be shown on the index view.
     *
     * @var bool
     */
    public $showOnIndex = false;

    public function __construct(string $name, $attribute = null, callable $resolveCallback = null)
    {
        parent::__construct($name, $attribute);
        $this->resolveCallback = $resolveCallback;

        $this->withMeta([
            'options' => config('nova-tinymce-editor', []),
        ]);
    }

    public function options($options)
    {
        $inlineOptions = $this->meta['options'] ?? [];

        return $this->withMeta([
            'options' => array_merge($inlineOptions, $options),
        ]);
    }

    /**
     * Prepare the element for JSON serialization.
     *
     * @return array
     */
    public function jsonSerialize(): array
    {
        return array_merge(parent::jsonSerialize(), [
            'shouldShow' => $this->shouldBeExpanded(),
        ]);
    }
}

Javascript filtered

Hey
I noticed javascript codes are filtered when saving or rendering into the editor, how can I enable javascript usage in the editor

Add new config

Hello Sir.
Thank you for your package
I need to add an extra config for the nova-tinymce-editor.php one of them is smart_paste
I need to prevent paste images in the editor.
Any advice, please?

Add extra paragraph when displaying content

Hi,
I ran into some problem when I added some simple text to the TinymceEditor field on Laravel Nova.
I added this text:

<p>Row one</p>
<p>&nbsp;</p>
<p>Row two</p>

So i pushed an enter between the 2 row, I checked the database and it saved like this there.
When I open up the item for editing, then it will return this for me:

<p>Row one</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Row two</p>

Seems for some reason added 2 more line break. After I hit the save button again in the database I will get this result:

<p>Row one</p>
<br/>
<p>&nbsp;</p>
<br/>
<p>Row two</p>

I tried inserting to the config file something like these:
'forced_root_block' => false,
'force_p_newlines' => false,
'force_br_newlines' => false,

None of them worked, could you give some explanation about this case?

Support 3rd party Plugins

I wanted to add a third-party bootstrap plugin - TinyMCE Bootstrap Plugin

It required me to add a custom object in the editor options, but it's not getting initialized

 'bootstrapConfig' => [
                    'url' =>'bootstrap5/plugin/',
                    'iconFont' => 'fontawesome5',
                    'imagesPath' => '/assets/images',
                    'key' => config('services.tinymce_plugin_key')
                ],

Any ideas on how to add third party plugins, or any plans to include that in the documentation?

Use specific filesystem storage disk for image upload

Hello and thank you for your awesome work on this package!

I just updated to the latest version in order to get the image upload feature on the editor. However, I don't know if it's possible to upload images to a specific disk defined in Laravel's config/filesystems.php?

For example, I'm working on a blog and would like to have my image hosted on my s3 bucket which is defined in my config/filesystems.php:

<?php

return [
    'disks' => [
        // ...
        
        's3' => [
            'driver' => 's3',
            'key' => env('AWS_ACCESS_KEY_ID'),
            'secret' => env('AWS_SECRET_ACCESS_KEY'),
            'region' => env('AWS_DEFAULT_REGION'),
            'bucket' => env('AWS_BUCKET'),
            'url' => env('AWS_URL'),
        ],
];

Is this possible yet? It would be very helpful as it would allow us to profit from CDN cache on the blog posts featuring images.

Thank you

Styling output

Hi

any information how to styling output content?

For example I add codesample plugin and in editor I see (code type php)

iScreen Shoter - Google Chrome - 230620170746

but in detail page I see another style

iScreen Shoter - Google Chrome - 230620170832

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.