Open kokev opened 1 year ago
I am sorry but I cannot replicate the problem: https://github.com/murdercode/Nova4-TinymceEditor/assets/7630252/4967fd49-9901-4af6-a7fa-2e3357c7dc6d
Are you sure it is not some strange configuration you put on the tiny? Have you tried resetting it using the default one?
Hi @murdercode
Thank you for checking and the video, I'm sending more details about the bug. Updated to version: 1.2.0 I'm using the default configuration: nova-tinymce-editor.conf:
'init' => [
'menubar' => false,
'autoresize_bottom_margin' => 40,
'branding' => false,
'image_caption' => true,
'paste_as_text' => true,
'autosave_interval' => '20s',
'autosave_retention' => '30m',
'browser_spellcheck' => true,
'contextmenu' => false,
],
'plugins' => [
'advlist',
'anchor',
'autolink',
'autosave',
'fullscreen',
'lists',
'link',
'image',
'media',
'table',
'code',
'wordcount',
'autoresize',
],
'toolbar' => [
'undo redo restoredraft | h2 h3 h4 |
bold italic underline strikethrough blockquote removeformat |
align bullist numlist outdent indent | link anchor table | code fullscreen spoiler',
]
In the Nove Resource I added the editor like this:
TinymceEditor::make('Content', 'content')
->nullable(),
Steps to recreate the bug:
<p>row1<br>row2</p>
<p>row3</p>
<p> </p>
<p>row4</p>
<p> </p>
<p> </p>
<p>row5</p>
<p>row1<br>row2</p>
<p> </p>
<p>row3</p>
<p> </p>
<p> </p>
<p> </p>
<p>row4</p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p>row5</p>
However in the database I have this:
<p>row1<br>row2</p>
<p>row3</p>
<p> </p>
<p>row4</p>
<p> </p>
<p> </p>
<p>row5</p>
<p>row1<br>row2</p><br/>
<p>row3</p><br/>
<p> </p><br/>
<p>row4</p><br/>
<p> </p><br/>
<p> </p><br/>
<p>row5</p>
It seems giving <br>
elements after paragraphs and still a mystery why do I get those extra empty paragraphs.
I have everything on default.
Needs some investigation, I'll try to replicate in next days. Maybe is a TinyMCE issue related
Hi, I ran into some problem when I added some simple text to the TinymceEditor field on Laravel Nova. I added this text:
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:
Seems for some reason added 2 more line break. After I hit the save button again in the database I will get this result:
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?