Search code examples
angularjswysiwyg

WYSIWYG Angular can't add spaces (Text-Angular)


I'm using the WYSIWYG Editor (text-angular) and im unable to create a whitespace with the spacebar. But im able to write a whitespace with alt+space. Is there any configuration im missing?

I already tried to use

ng-trim="false"

but it has no effect

This is where I use the text-angular.

<div data-ng-if="translation.multiline"
     text-angular="text-angular"
     placeholder="no translation provided"
     name="translation-{{translation.language}}-{{item.key}}"
     data-esc-key="resetField(translationsForm, 'translation-{{translation.language}}-{{item.key}}')"
     class="no-tinymce-plz form-control translation-strings" cols="40" rows="{{item.rows}}"
     data-ng-model="translation.translated" ng-model-options="{ updateOn: 'blur' }"
     data-ng-change="updateField(translation.language,item.key,translation.translated)">
</div>

Solution

  • Are you taking what is being output under the HTML header from text-angular and pasting it into your own app? See if any css classes are affecting the div (by using chrome inspector for example). Text-Angular just puts a space character between the paragraph tags which doesn't work 100% for all browsers.

    A better method for adding space characters might be using nbsp; in your html where you want a space to appear or just aligning things with css.