Coder Social home page Coder Social logo

teditor's People

Contributors

dids avatar jessejiang0214 avatar niklaswideberg avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

teditor's Issues

Open TEditor from modal

Hi, I have a modal page that open a TEditor, but the TEditor opens below the modal page.
So, when I close the modal page, I can see the TEditor.

Image

How can I open it over the modal page?

Thank you

Android.OS.TransactionTooLargeException

I have some cases where I have a large HTML string (base 64 in line images). When I have that case, I experience the TransactionTooLargeException.

I believe this has to do with the Activity / PutExtra on a large string (near/over 1 MB).

Has anyone else experienced this? Any tips / workarounds? I have the least amount of control over what is in the HTML (vendor user content). But anything I can do to how I'm using the control? Or would this be a change to the Android implementation / use of PutExtra?

Thoughts / suggestions appreciated.

Editor Title

There should be a property to set Title instead of the hardcoding 'HTML Editor'.

Issue Presenting TEditor from "modal" Xamarin Forms Page (iOS)

I'm able to present the TE control fine via a Xamarin Forms Page that was that was "Pushed" on the Navigation stack. However, I run into issues if the page that I'm trying to present the control from was a modal, the control will not present. The app doesn't crash either. I've tried both the sample application as well as consuming the nuget package in a simple application.

Steps to Reproduce:

  1. Download Sample.
  2. In the App class switch the MainPage to Present a new page.
public class App : Application
{
    public App()
    {
       this.MainPage = new NavigationPage(new SecondPage());
     }
  1. Have the second page present a ContentPage with that will present the TEditor Control.
public SecondPage()
{
	var nextButton = new Button { Text = "Next Page" };
	
        Content = new StackLayout
	{
		Children = { nextButton}
	};

	var contentPage = new ContentPage { Content = new TEditorHtmlView(), BackgroundColor = Color.White };
	nextButton.Clicked += (object sender, EventArgs e) => { Navigation.PushModalAsync(contentPage); };
}
  1. The TEditor Control will not present

iOS 11 crash

Launching the sample application and removing a few characters in editor results in:

NSInternalInconsistencyException Reason: impossible to set up layout with view hierarchy unprepared for constraint.

Custom Icon/Action

Hello,
Very nice editor implementation for sure.

Sorry for my noob question. I'm trying to create a custom icon/toolbaritem. What I cant figure out is how to override the custclick. I want to use the editor to allow other formatting thats not covered in the standard one.

            var toolbar = new ToolbarBuilder().AddAll();
            var myCustomItem = new TEditorToolbarItem { Label = "blank", ImagePath = "blank.png"};
            toolbar.Add(myCustomItem);

and how to get it to execute any custom javascript inside the original zss editor.

                ClickFunc = (input) =>
                {
                    input.Paragraph();  //Run my custom java thing here
                    return string.Empty;
                }

and

        public void Paragraph()  //or my custom function/and java here.
        {
            string trigger = @"zss_editor.setParagraph();";
            _javaScriptEvaluatFunc.Invoke(trigger);
        }

Any direction or help is appreciated.
Thanks.
Brent

Could not initialize an instance of the type 'UIKit.UIImage'

I'm trying to add TEditor to my Xamarin application (not using Xamarin.Forms) and when calling the
await CrossTEditor.Current.ShowTEditor it's giving me this error:

System.Exception: Could not initialize an instance of the type 'UIKit.UIImage': the native 'initWithContentsOfFile:' method returned nil.
It is possible to ignore this condition by setting MonoTouch.ObjCRuntime.Class.ThrowOnInitFailure to false.
  at Foundation.NSObject.InitializeHandle (IntPtr handle, System.String initSelector) [0x00094] in /Users/builder/data/lanes/3234/d8bedd03/source/maccore/src/Foundation/NSObject2.cs:453 
  at UIKit.UIImage..ctor (System.String filename) [0x0002e] in /Users/builder/data/lanes/3234/d8bedd03/source/maccore/src/build/ios/native/UIKit/UIImage.g.cs:94 
  at PopColorPicker.iOS.PopColorPickerViewController.SetViewControllers () [0x00000] in C:\Users\Michael\Documents\TEditor\PopColorPicker.iOS.Shared\PopColorPickerViewController.cs:112 
  at PopColorPicker.iOS.PopColorPickerViewController.ViewDidLoad () [0x0007d] in C:\Users\Michael\Documents\TEditor\PopColorPicker.iOS.Shared\PopColorPickerViewController.cs:80 
  at (wrapper managed-to-native) ObjCRuntime.Messaging:IntPtr_objc_msgSendSuper (intptr,intptr)
  at UIKit.UITabBarController..ctor () [0x0003b] in /Users/builder/data/lanes/3234/d8bedd03/source/maccore/src/build/ios/native/UIKit/UITabBarController.g.cs:53 
  at PopColorPicker.iOS.PopColorPickerViewController..ctor () [0x00000] in C:\Users\Michael\Documents\TEditor\PopColorPicker.iOS.Shared\PopColorPickerViewController.cs:19 
  at TEditor.TEditorViewController.AddColorPickerControl () [0x00000] in C:\Users\Michael\Documents\TEditor\iOS\Controls\TEditorViewController.cs:111 
  at TEditor.TEditorViewController.ViewDidLoad () [0x00018] in C:\Users\Michael\Documents\TEditor\iOS\Controls\TEditorViewController.cs:245 
  at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
  at UIKit.UIApplication.Main (System.String[] args, IntPtr principal, IntPtr delegate) [0x00005] in /Users/builder/data/lanes/3234/d8bedd03/source/maccore/src/UIKit/UIApplication.cs:77 
  at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00038] in /Users/builder/data/lanes/3234/d8bedd03/source/maccore/src/UIKit/UIApplication.cs:61 
  at TiendaNubeIOS.Application.Main (System.String[] args) [0x00008] in /Users/juane/mobile-apps/TIendaNubeIOS/Main.cs:13 
2017-05-31 17:57:22.024 TiendaNubeIOS[31327:4189271] Unhandled managed exception:
Could not initialize an instance of the type 'UIKit.UIImage': the native 'initWithContentsOfFile:' method returned nil.
It is possible to ignore this condition by setting MonoTouch.ObjCRuntime.Class.ThrowOnInitFailure to false. (System.Exception)
  at Foundation.NSObject.InitializeHandle (IntPtr handle, System.String initSelector) [0x00094] in /Users/builder/data/lanes/3234/d8bedd03/source/maccore/src/Foundation/NSObject2.cs:453 
  at UIKit.UIImage..ctor (System.String filename) [0x0002e] in /Users/builder/data/lanes/3234/d8bedd03/source/maccore/src/build/ios/native/UIKit/UIImage.g.cs:94 
  at PopColorPicker.iOS.PopColorPickerViewController.SetViewControllers () [0x00000] in C:\Users\Michael\Documents\TEditor\PopColorPicker.iOS.Shared\PopColorPickerViewController.cs:112 
  at PopColorPicker.iOS.PopColorPickerViewController.ViewDidLoad () [0x0007d] in C:\Users\Michael\Documents\TEditor\PopColorPicker.iOS.Shared\PopColorPickerViewController.cs:80 
  at (wrapper managed-to-native) ObjCRuntime.Messaging:IntPtr_objc_msgSendSuper (intptr,intptr)
  at UIKit.UITabBarController..ctor () [0x0003b] in /Users/builder/data/lanes/3234/d8bedd03/source/maccore/src/build/ios/native/UIKit/UITabBarController.g.cs:53 
  at PopColorPicker.iOS.PopColorPickerViewController..ctor () [0x00000] in C:\Users\Michael\Documents\TEditor\PopColorPicker.iOS.Shared\PopColorPickerViewController.cs:19 
  at TEditor.TEditorViewController.AddColorPickerControl () [0x00000] in C:\Users\Michael\Documents\TEditor\iOS\Controls\TEditorViewController.cs:111 
  at TEditor.TEditorViewController.ViewDidLoad () [0x00018] in C:\Users\Michael\Documents\TEditor\iOS\Controls\TEditorViewController.cs:245 
  at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
  at UIKit.UIApplication.Main (System.String[] args, IntPtr principal, IntPtr delegate) [0x00005] in /Users/builder/data/lanes/3234/d8bedd03/source/maccore/src/UIKit/UIApplication.cs:77 
  at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00038] in /Users/builder/data/lanes/3234/d8bedd03/source/maccore/src/UIKit/UIApplication.cs:61 
  at TiendaNubeIOS.Application.Main (System.String[] args) [0x00008] in /Users/juane/mobile-apps/TIendaNubeIOS/Main.cs:13 

It seems that [email protected] cannot be found. Do you know any workaround?
Thanks!

Ui not showing in Xamarin.iOS

Calling var response = await CrossTEditor.Current.ShowTEditor("<strong>TESTING</strong><p>yolo</p>"); in a Xamarin.iOS app does nothing. No UI is shown, and the await call never comes back. Any ideas?

Open TEditor with empty text

When TEditor opens up with empty text, user needs to pres in upper left corner to enable editing.Not anywhere as expected. It's Android specific, iOS all ok.

Focusing the editor input field (Xamarin.Forms)

Having the abililty either manually or automatically (on ShowTEditor() for instance) focus the editor input field is something I'd definitely love to see and actually have a need for.

Any chance of getting this or can you alternatively think of a workaround? Subclassing the editor or something?

Where to get 'Done' and 'Back' - Do they depend on the device? - More customized code

Thank you very much for this project. It helps me a lot.

Where can I get the 'Done' and 'Back' abbility?

In my project I use static ObservableCollections und properties which are set before instantiating the editor class and assigning the editor to the MainPage. I set 'IsEnabled' true or false. If a user has the privilege to change the html code, I try to set the property of the static ObservableCollection by using the setter of the html property in the editor class. I implemented 'INotifyPropertyChanged'. When the user navigates back, the changes of the bound property should be appearing on the page.

Could you share some customized code please?

Discard Changes

Discard Changes should return the original string that was passed in instead of a blank string. Currently there is no way to differentiate between the Discard Changes action and just saving a blank string.

TEditor Issue with IOS

I'm using TEditor for cross platform app, its working fine for android but In IOS when i try to write using Rich Text Editor(TEditor) that time virtual keyboard is not showing.

Placeholder

Hi,
I am sorry if this is not the wight place to ask some information. I have been trying to add a placeholder in the TEditor. I have been trying to add one with the html content, but it is displayed weirdly. I tried to make it happen with : <p><input type='text' placeholder='Please enter your text'></p>
, but a border appear and it does not behave like a placeholder. I need to delete the placeholder with backspace to make it disappear.

If you have a better way to make a real placeholder, please let me know.

Handler

Hello,
I modified TEditor, added one new button that will insert image into it. So my question is: How do I communicate between package(TEditor) and my project. I want to make when "InsertImage" is pressed, open dialog with custom list that I have in my project, which shows images and folders on server.
Problem is that I cant make one handler and call it in my project when that button is pressed. Any solutions for my issue?
Thanks.

how to get html data from control in iOS

WebView displayWebView = (WebView)TEditorControl.Children[1];
string strValue = ((HtmlWebViewSource)displayWebView.Source).Html.ToString();

This works fine in ANDROID. But not in iOS. Any work around?

nuget Error

This functionality is not implemented in the portable version of this assembly. You should reference the NuGet package from your main application project in order to reference the platform-specific implementation.

Font size is ignored

Hi!
First of all, thanks for this project.
Second, when we load a html text, font size gets ignored, and worse, when we save (and then overwrite the original string) this one has incorrect font size...
Can you fix this? Is possible also to add option in the toolbar to choose font size?
Thanks!

IOS 11: Application crash on switching keyboard mode

Hi,

My application crashes while switching keyboard mode from alphabetic to numeric keyboard.

Do you have any idea how we can fix this problem?

The last row is the one pointing to the offending code.

Error logs:
2017-10-02 14:54:14.179 TEditor.Forms.Sample.iOS[29082:2907807] API error: <_UIKBCompatInputView: 0x7fa7cc751980; frame = (0 0; 0 0); layer = <CALayer: 0x60000142aae0>> returned 0 width, assuming UIViewNoIntrinsicMetric
2017-10-02 14:54:14.179 TEditor.Forms.Sample.iOS[29082:2907807] API error: <_UIKBCompatInputView: 0x7fa7cc751980; frame = (0 0; 0 0); layer = <CALayer: 0x60000142aae0>> returned 0 width, assuming UIViewNoIntrinsicMetric

2017-10-02 14:54:23.688 TEditor.Forms.Sample.iOS[29082:2907807] *** Assertion failure in -[UIInputSetHostView _layoutEngine_didAddLayoutConstraint:roundingAdjustment:mutuallyExclusiveConstraints:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit_Sim/UIKit-3694.4.18/NSLayoutConstraint_UIKitAdditions.m:734

Thanks for your help beforehand!
Eric

Editor is not Open in iOS

Html editor is not opening in ios at the same time its working fine in Android,
Note: i am using shell navigations, because of this issue happening?

Control now unresponsive on Android

I have been testing out your control and it worked fine in the beginning, however now on android it is unresponsive.

When I exit the app and check my output i see the same error spammed a couple of hundred times:

"Uncaught IndexSizeError: Failed to execute 'getRangeAt' on 'Selection': 0 is not a valid index.", source: http://www.xam-consulting.com/ (940)

Problems running on ios

I am trying to add this component to my project, the first attempt was adding via nuget, but I had some problems like losing the data when rotating the screen and not opening in ios, downloaded the source I agreed not to lose the data in android and compiled caught the dll and added the references in my projects android / ios and forms, but when running the ios does not work, someone has had a similar problem and could you guide me?

Use as special editor

Hi, I am looking for an editor that I can extend for the following 2 use cases:

  • Simple: Define HTML templates. The toolbar would be extended to have a picker with a list of parameters that can be inserted in the HTML.
  • More complex: repurpose as a formular editor where the toolbar has the supported mathematical expressions and again a picker with available parameters.

Would this be doable with the editor? How would you approach this?

Open TEditor in view

Hello,
So I have a problem, how to open TEditor in a view, not on full screen?

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.