Questions tagged [suneditor]

SunEditor is a pure javascript based WYSIWYG html editor with no dependencies.

Pure javascript based WYSIWYG html editor with no dependencies.

Source can be found at https://github.com/JiHong88/SunEditor

Besides supporting whatever you would expect of a typical javascript based richtext-editor, SunEditor provides some unique out-of-the-box features:

  • image upload (stored as base64image)
  • live <table> manipulation
  • fullscreen preview
31 questions
4
votes
1 answer

SyntaxError: Cannot use import statement outside a module with dynamic import of Nextjs

I followed the doc of SunEditor, it's like: import React from 'react'; import dynamic from "next/dynamic"; import 'suneditor/dist/css/suneditor.min.css'; // Import Sun Editor's CSS File const SunEditor = dynamic(() => import("suneditor-react"), { …
Loc Tran
  • 313
  • 3
  • 12
2
votes
0 answers

Using Sun Editor in Next JS with CodeMirror

I am trying to use SunEditor in a NextJS app which I am able to with dynamic imports as below const SunEditor = dynamic(() => import("suneditor-react"), { ssr: false, }); Now the problem begins when I wish to use the codeMirror option in the…
Vikrant Shah
  • 101
  • 1
  • 9
2
votes
0 answers

How to set set default value of the Suneditor formats dropdown to Header1

https://codesandbox.io/s/suneditor-react-forked-w594x3?file=/src/App.js:781-788 Into the above mentioned link I have added below mentioned format. formats: ["h1", "h2", "h3", "h4", "h5", "h6"] It is showing multiple header options in the format…
Manoj Naik
  • 386
  • 4
  • 18
2
votes
1 answer

State not updating in SunEditor onChange event

version next: 12.0.7 suneditor: 2.41.3 suneditor-react: 3.3.1 const SunEditor = dynamic(() => import("suneditor-react"), { ssr: false, }); import "suneditor/dist/css/suneditor.min.css"; // Import Sun Editor's CSS File // states const [toggle,…
Artzeeker
  • 117
  • 10
2
votes
0 answers

mentioning user from database on triggering @ event in suneditor

I am using Suneditor in reactjs. Now here i want to mention some user name from database while writing description.But i am not able to find any "mention" plugin using suneditor.Is there any way i can implement it using suneditor? Mentioned username…
arafat
  • 59
  • 1
  • 7
2
votes
3 answers

How to get the content of SunEditor (Richtextbox) inside Angular JS variable

I am using the SunEditor alongside AngularJS, my intent is to get the content of the richtext box and pass it to Angular JS, I have tried ng-model but it doesn't seem to work. Is there any solution available for getting the all the html contents…
1
vote
1 answer

suneditor-react textarea is not clearing out

I'm using suneditor-react for rich text editor. All its functionalities are working fine but now problem is after pressing submit button the text area should be empty. While I do console.log, the content is showing empty, but it still appears on the…
mitu1234
  • 135
  • 6
1
vote
4 answers

Next.Js-SunEditor Error: core._resourcesStateChange is not a function

I want to create RichTextBox(wysiwyg) on Next.Js using SunEditor, but I am getting TypeError: core._resourcesStateChange is not a function. I do not encounter any problems when I try the same code on React.js. How can I fix this situation? Editor…
Berk KARASU
  • 71
  • 1
  • 9
1
vote
1 answer

Add suneditor css file with symfony webpack-encore

I'm trying to ad suneditor to a symfony project using webpak-encore , I have created a js file htmlEditor.js with this code import SUNEDITOR from 'suneditor' import 'suneditor/dist/css/suneditor.min.css' import plugins from…
fg_st
  • 109
  • 5
1
vote
0 answers

About Custom Table in Sun Editor

enter image description here I have added a custom table plugin for using different class names and styling. But when I add a new table to the table first it don't gives an error but just add
İdris Ay
  • 11
  • 1
1
vote
2 answers

imageUploadUrl SunEditor in Next.js

I want to ask because after a few days I haven't found a way to upload files to the API. I use suneditor for editor in my Next.js project. I want that when I upload an image, the image will be sent to the API https://api-my.com/v1/file-uploads or…
1
vote
0 answers

You may need an additional loader to handle the result of these loaders - react

When i start the the react app it gives the following error. i have commented the export * as buttonList from './SundEditor' from the package in node_modules then it works but i need this buttonList and react can't load it "dependencies": { …
Faizan Ahmed
  • 184
  • 3
  • 12
1
vote
2 answers

SetContents SunEditor is not working React

I have been testing with SunEditor since I want to pre-load an HTML text stored in DB and let users modify it if necessary. I'm passing a ref variable from parent so when the submit button is clicked he could get the value and save modificacions.…
1
vote
1 answer

How do I display data created by SunEditor in a ReactJS app

I just started working with SunEditor and so far I have successfully added it to a React component and am storing the resulting document in mongoDB when clicking save. So far that's half the battle. Now I want to render the stored document and I…
Tim Manchester
  • 137
  • 1
  • 3
  • 16
0
votes
0 answers

Font Name and Font Size issues in Sun Editor

I integrated Sun Editor in my react application. I followed the instructions which are given sun editor and integrated successfully. Application is also working good. The only problem when I select font name or font size from drop down, editor works…
phani
  • 72
  • 6
1
2 3