Here we collect some common issues you may have during developing your Xeditor configuration. Furthermore, we show you how to find and finally fix them.
No configured role
Roles define a lot of properties in Xeditor, e.g. what the element looks like and how it behaves generally. If you missed to set a role for an element or misspelled the role name, Xeditor is not able to match the pre-configured role properties to your element.
The tricky part is that there won't be any error message in your console since technically there is no wrong logic, so actually nothing happens with the element.
Referencing the wrong element
In the elementType
file you need to reference every element you are using.
Example:
To save time you copy and paste our toolbar configuration from our demo. For the bold button you are referencing an element that doesn't exist because you don't have a bold element in your schema or it has a different name than in our demo schema.
This may also be the case if you have a typo in your elementType
file.
Result
- an error is thrown in your console
- you are not able to write in your document
Actual wrong code / logic
If you actually created a wrong custom logic, most of the times there is an error thrown in your console.
Then you just need to look in your console for the error message and the relevant method and search in our API documentation for exactly this method. There you get all the information about the parameters and events in order to use this method.
Most of the times you should already find the source if you compare it with your code.